cool-retro-term
107 строк · 3.6 Кб
1/*******************************************************************************
2* Copyright (c) 2013-2021 "Filippo Scognamiglio"
3* https://github.com/Swordfish90/cool-retro-term
4*
5* This file is part of cool-retro-term.
6*
7* cool-retro-term is free software: you can redistribute it and/or modify
8* it under the terms of the GNU General Public License as published by
9* the Free Software Foundation, either version 3 of the License, or
10* (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16*
17* You should have received a copy of the GNU General Public License
18* along with this program. If not, see <http://www.gnu.org/licenses/>.
19*******************************************************************************/
20import QtQuick 2.2
21
22QtObject {
23property int selectedFontIndex
24property real scaling
25property var _font: fontlist.get(selectedFontIndex)
26property var source: _font.source
27property int pixelSize: _font.pixelSize
28property int lineSpacing: _font.lineSpacing
29property real screenScaling: scaling * _font.baseScaling
30property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
31property bool lowResolutionFont: true
32
33property ListModel fontlist: ListModel {
34ListElement {
35name: "COMMODORE_PET"
36text: "Commodore PET (1977)"
37source: "fonts/1977-commodore-pet/PetMe.ttf"
38lineSpacing: 3
39pixelSize: 8
40baseScaling: 3.5
41fontWidth: 0.8
42}
43ListElement {
44name: "IBM_PC"
45text: "IBM PC (1981)"
46source: "fonts/1981-ibm-pc/PxPlus_IBM_BIOS.ttf"
47lineSpacing: 3
48pixelSize: 8
49baseScaling: 3.5
50fontWidth: 0.8
51}
52ListElement {
53name: "PROGGY_TINY"
54text: "Proggy Tiny (Modern)"
55source: "fonts/modern-proggy-tiny/ProggyTiny.ttf"
56lineSpacing: 1
57pixelSize: 16
58baseScaling: 3.3
59fontWidth: 0.9
60}
61ListElement {
62name: "TERMINUS_SCALED"
63text: "Terminus (Modern)"
64source: "fonts/modern-terminus/TerminusTTF-4.46.0.ttf"
65lineSpacing: 1
66pixelSize: 12
67baseScaling: 3.0
68fontWidth: 1.0
69}
70ListElement {
71name: "PRO_FONT_SCALED"
72text: "Pro Font (Modern)"
73source: "fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf"
74lineSpacing: 1
75pixelSize: 12
76baseScaling: 3.0
77fontWidth: 1.0
78}
79ListElement {
80name: "APPLE_II"
81text: "Apple ][ (1977)"
82source: "fonts/1977-apple2/PrintChar21.ttf"
83lineSpacing: 2
84pixelSize: 8
85baseScaling: 3.5
86fontWidth: 0.9
87}
88ListElement {
89name: "ATARI_400"
90text: "Atari 400-800 (1979)"
91source: "fonts/1979-atari-400-800/AtariClassic-Regular.ttf"
92lineSpacing: 3
93pixelSize: 8
94baseScaling: 3.5
95fontWidth: 0.8
96}
97ListElement {
98name: "COMMODORE_64"
99text: "Commodore 64 (1982)"
100source: "fonts/1982-commodore64/C64_Pro_Mono-STYLE.ttf"
101lineSpacing: 3
102pixelSize: 8
103baseScaling: 3.5
104fontWidth: 0.8
105}
106}
107}
108