2014-06-27 23:54:17 +02:00
|
|
|
/*******************************************************************************
|
|
|
|
* Copyright (c) 2013 "Filippo Scognamiglio"
|
2014-09-03 22:19:34 +02:00
|
|
|
* https://github.com/Swordfish90/cool-retro-term
|
2014-06-27 23:54:17 +02:00
|
|
|
*
|
2014-09-03 22:19:34 +02:00
|
|
|
* This file is part of cool-retro-term.
|
2014-06-27 23:54:17 +02:00
|
|
|
*
|
2014-09-03 22:19:34 +02:00
|
|
|
* cool-retro-term is free software: you can redistribute it and/or modify
|
2014-06-27 23:54:17 +02:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
import QtQuick 2.2
|
2014-06-23 16:25:41 +02:00
|
|
|
|
|
|
|
Item{
|
|
|
|
property int selectedFontIndex
|
2014-09-10 01:14:10 +02:00
|
|
|
property real scaling
|
2014-06-23 16:25:41 +02:00
|
|
|
property alias fontlist: fontlist
|
|
|
|
property var _font: fontlist.get(selectedFontIndex)
|
|
|
|
property var source: _font.source
|
2014-09-10 00:59:53 +02:00
|
|
|
property int pixelSize: _font.pixelSize
|
|
|
|
property int lineSpacing: _font.lineSpacing
|
2014-09-10 01:14:10 +02:00
|
|
|
property real screenScaling: scaling * _font.baseScaling
|
2014-12-12 01:38:32 +01:00
|
|
|
property real defaultFontWidth: fontlist.get(selectedFontIndex).fontWidth
|
2014-06-23 16:25:41 +02:00
|
|
|
|
|
|
|
ListModel{
|
|
|
|
id: fontlist
|
|
|
|
ListElement{
|
2014-06-25 17:43:57 +02:00
|
|
|
text: "Commodore PET (1977)"
|
|
|
|
source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
|
2014-06-23 16:25:41 +02:00
|
|
|
lineSpacing: 2
|
2014-09-10 00:59:53 +02:00
|
|
|
pixelSize: 8
|
|
|
|
baseScaling: 4.0
|
2014-12-12 01:38:32 +01:00
|
|
|
fontWidth: 0.7
|
2014-06-23 16:25:41 +02:00
|
|
|
}
|
|
|
|
ListElement{
|
|
|
|
text: "Apple ][ (1977)"
|
|
|
|
source: "fonts/1977-apple2/PrintChar21.ttf"
|
|
|
|
lineSpacing: 2
|
2014-09-10 00:59:53 +02:00
|
|
|
pixelSize: 8
|
|
|
|
baseScaling: 4.0
|
2014-12-12 01:38:32 +01:00
|
|
|
fontWidth: 0.8
|
2014-06-23 16:25:41 +02:00
|
|
|
}
|
|
|
|
ListElement{
|
|
|
|
text: "Atari 400-800 (1979)"
|
|
|
|
source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
|
|
|
|
lineSpacing: 3
|
2014-09-10 00:59:53 +02:00
|
|
|
pixelSize: 8
|
|
|
|
baseScaling: 4.0
|
2014-12-12 01:38:32 +01:00
|
|
|
fontWidth: 0.7
|
2014-06-23 16:25:41 +02:00
|
|
|
}
|
|
|
|
ListElement{
|
|
|
|
text: "Commodore 64 (1982)"
|
|
|
|
source: "fonts/1982-commodore64/C64_User_Mono_v1.0-STYLE.ttf"
|
|
|
|
lineSpacing: 3
|
2014-09-10 00:59:53 +02:00
|
|
|
pixelSize: 8
|
|
|
|
baseScaling: 4.0
|
2014-12-12 01:38:32 +01:00
|
|
|
fontWidth: 0.7
|
2014-06-23 16:25:41 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|