cool-retro-term

Форк
0
/
FontPixels.qml 
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
*******************************************************************************/
20
import QtQuick 2.2
21

22
QtObject {
23
    property int selectedFontIndex
24
    property real scaling
25
    property var _font: fontlist.get(selectedFontIndex)
26
    property var source: _font.source
27
    property int pixelSize: _font.pixelSize
28
    property int lineSpacing: _font.lineSpacing
29
    property real screenScaling: scaling * _font.baseScaling
30
    property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
31
    property bool lowResolutionFont: true
32

33
    property ListModel fontlist: ListModel {
34
        ListElement {
35
            name: "COMMODORE_PET"
36
            text: "Commodore PET (1977)"
37
            source: "fonts/1977-commodore-pet/PetMe.ttf"
38
            lineSpacing: 3
39
            pixelSize: 8
40
            baseScaling: 3.5
41
            fontWidth: 0.8
42
        }
43
        ListElement {
44
            name: "IBM_PC"
45
            text: "IBM PC (1981)"
46
            source: "fonts/1981-ibm-pc/PxPlus_IBM_BIOS.ttf"
47
            lineSpacing: 3
48
            pixelSize: 8
49
            baseScaling: 3.5
50
            fontWidth: 0.8
51
        }
52
        ListElement {
53
            name: "PROGGY_TINY"
54
            text: "Proggy Tiny (Modern)"
55
            source: "fonts/modern-proggy-tiny/ProggyTiny.ttf"
56
            lineSpacing: 1
57
            pixelSize: 16
58
            baseScaling: 3.3
59
            fontWidth: 0.9
60
        }
61
        ListElement {
62
            name: "TERMINUS_SCALED"
63
            text: "Terminus (Modern)"
64
            source: "fonts/modern-terminus/TerminusTTF-4.46.0.ttf"
65
            lineSpacing: 1
66
            pixelSize: 12
67
            baseScaling: 3.0
68
            fontWidth: 1.0
69
        }
70
        ListElement {
71
            name: "PRO_FONT_SCALED"
72
            text: "Pro Font (Modern)"
73
            source: "fonts/modern-pro-font-win-tweaked/ProFontWindows.ttf"
74
            lineSpacing: 1
75
            pixelSize: 12
76
            baseScaling: 3.0
77
            fontWidth: 1.0
78
        }
79
        ListElement {
80
            name: "APPLE_II"
81
            text: "Apple ][ (1977)"
82
            source: "fonts/1977-apple2/PrintChar21.ttf"
83
            lineSpacing: 2
84
            pixelSize: 8
85
            baseScaling: 3.5
86
            fontWidth: 0.9
87
        }
88
        ListElement {
89
            name: "ATARI_400"
90
            text: "Atari 400-800 (1979)"
91
            source: "fonts/1979-atari-400-800/AtariClassic-Regular.ttf"
92
            lineSpacing: 3
93
            pixelSize: 8
94
            baseScaling: 3.5
95
            fontWidth: 0.8
96
        }
97
        ListElement {
98
            name: "COMMODORE_64"
99
            text: "Commodore 64 (1982)"
100
            source: "fonts/1982-commodore64/C64_Pro_Mono-STYLE.ttf"
101
            lineSpacing: 3
102
            pixelSize: 8
103
            baseScaling: 3.5
104
            fontWidth: 0.8
105
        }
106
    }
107
}
108

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.