mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2026-02-08 00:32:27 +00:00
Allow customizing line spacing.
This commit is contained in:
@@ -127,6 +127,7 @@ QtObject {
|
|||||||
property real totalFontScaling: baseFontScaling * fontScaling
|
property real totalFontScaling: baseFontScaling * fontScaling
|
||||||
|
|
||||||
property real fontWidth: 1.0
|
property real fontWidth: 1.0
|
||||||
|
property real lineSpacing: 0.1
|
||||||
|
|
||||||
property bool lowResolutionFont: false
|
property bool lowResolutionFont: false
|
||||||
|
|
||||||
@@ -218,6 +219,7 @@ QtObject {
|
|||||||
|
|
||||||
onTotalFontScalingChanged: updateFont()
|
onTotalFontScalingChanged: updateFont()
|
||||||
onFontWidthChanged: updateFont()
|
onFontWidthChanged: updateFont()
|
||||||
|
onLineSpacingChanged: updateFont()
|
||||||
|
|
||||||
function getIndexByName(name) {
|
function getIndexByName(name) {
|
||||||
for (var i = 0; i < fontlist.count; i++) {
|
for (var i = 0; i < fontlist.count; i++) {
|
||||||
@@ -271,7 +273,8 @@ QtObject {
|
|||||||
"bloomQuality": bloomQuality,
|
"bloomQuality": bloomQuality,
|
||||||
"burnInQuality": burnInQuality,
|
"burnInQuality": burnInQuality,
|
||||||
"useCustomCommand": useCustomCommand,
|
"useCustomCommand": useCustomCommand,
|
||||||
"customCommand": customCommand
|
"customCommand": customCommand,
|
||||||
|
"lineSpacing": lineSpacing
|
||||||
}
|
}
|
||||||
return stringify(settings)
|
return stringify(settings)
|
||||||
}
|
}
|
||||||
@@ -407,6 +410,7 @@ QtObject {
|
|||||||
fontName = settings.fontName !== undefined ? settings.fontName : fontName
|
fontName = settings.fontName !== undefined ? settings.fontName : fontName
|
||||||
fontSource = settings.fontSource !== undefined ? settings.fontSource : fontSource
|
fontSource = settings.fontSource !== undefined ? settings.fontSource : fontSource
|
||||||
fontWidth = settings.fontWidth !== undefined ? settings.fontWidth : fontWidth
|
fontWidth = settings.fontWidth !== undefined ? settings.fontWidth : fontWidth
|
||||||
|
lineSpacing = settings.lineSpacing !== undefined ? settings.lineSpacing : lineSpacing
|
||||||
|
|
||||||
_margin = settings.margin !== undefined ? settings.margin : _margin
|
_margin = settings.margin !== undefined ? settings.margin : _margin
|
||||||
_frameMargin = settings.frameMargin !== undefined ? settings.frameMargin : _frameMargin
|
_frameMargin = settings.frameMargin !== undefined ? settings.frameMargin : _frameMargin
|
||||||
@@ -482,6 +486,7 @@ QtObject {
|
|||||||
"fontName": "TERMINUS_SCALED",
|
"fontName": "TERMINUS_SCALED",
|
||||||
"fontSource": 0,
|
"fontSource": 0,
|
||||||
"fontWidth": 1,
|
"fontWidth": 1,
|
||||||
|
"lineSpacing": 0.1,
|
||||||
"glowingLine": 0.2,
|
"glowingLine": 0.2,
|
||||||
"horizontalSync": 0.08,
|
"horizontalSync": 0.08,
|
||||||
"jitter": 0.1997,
|
"jitter": 0.1997,
|
||||||
@@ -542,6 +547,7 @@ QtObject {
|
|||||||
"fontName": "PRO_FONT_SCALED",
|
"fontName": "PRO_FONT_SCALED",
|
||||||
"fontSource": 0,
|
"fontSource": 0,
|
||||||
"fontWidth": 1,
|
"fontWidth": 1,
|
||||||
|
"lineSpacing": 0.1,
|
||||||
"glowingLine": 0.2,
|
"glowingLine": 0.2,
|
||||||
"horizontalSync": 0.151,
|
"horizontalSync": 0.151,
|
||||||
"jitter": 0.11,
|
"jitter": 0.11,
|
||||||
@@ -572,6 +578,7 @@ QtObject {
|
|||||||
"fontName": "COMMODORE_PET",
|
"fontName": "COMMODORE_PET",
|
||||||
"fontSource": 0,
|
"fontSource": 0,
|
||||||
"fontWidth": 1,
|
"fontWidth": 1,
|
||||||
|
"lineSpacing": 0.1,
|
||||||
"glowingLine": 0.2,
|
"glowingLine": 0.2,
|
||||||
"horizontalSync": 0.151,
|
"horizontalSync": 0.151,
|
||||||
"jitter": 0,
|
"jitter": 0,
|
||||||
@@ -602,6 +609,7 @@ QtObject {
|
|||||||
"fontName": "APPLE_II",
|
"fontName": "APPLE_II",
|
||||||
"fontSource": 0,
|
"fontSource": 0,
|
||||||
"fontWidth": 1,
|
"fontWidth": 1,
|
||||||
|
"lineSpacing": 0.1,
|
||||||
"glowingLine": 0.22,
|
"glowingLine": 0.22,
|
||||||
"horizontalSync": 0.16,
|
"horizontalSync": 0.16,
|
||||||
"jitter": 0.1,
|
"jitter": 0.1,
|
||||||
@@ -632,6 +640,7 @@ QtObject {
|
|||||||
"fontName": "COMMODORE_PET",
|
"fontName": "COMMODORE_PET",
|
||||||
"fontSource": 0,
|
"fontSource": 0,
|
||||||
"fontWidth": 1,
|
"fontWidth": 1,
|
||||||
|
"lineSpacing": 0.1,
|
||||||
"glowingLine": 0.3,
|
"glowingLine": 0.3,
|
||||||
"horizontalSync": 0.42,
|
"horizontalSync": 0.42,
|
||||||
"jitter": 0.4,
|
"jitter": 0.4,
|
||||||
@@ -659,9 +668,10 @@ QtObject {
|
|||||||
"contrast": 0.85,
|
"contrast": 0.85,
|
||||||
"flickering": 0.0955,
|
"flickering": 0.0955,
|
||||||
"fontColor": "#ffffff",
|
"fontColor": "#ffffff",
|
||||||
"fontName": "IBM_DOS",
|
"fontName": "IBM_VGA_8x16",
|
||||||
"fontSource": 0,
|
"fontSource": 0,
|
||||||
"fontWidth": 1,
|
"fontWidth": 1,
|
||||||
|
"lineSpacing": 0.1,
|
||||||
"glowingLine": 0.1545,
|
"glowingLine": 0.1545,
|
||||||
"horizontalSync": 0,
|
"horizontalSync": 0,
|
||||||
"jitter": 0.1545,
|
"jitter": 0.1545,
|
||||||
@@ -692,6 +702,7 @@ QtObject {
|
|||||||
"fontName": "IBM_3278",
|
"fontName": "IBM_3278",
|
||||||
"fontSource": 0,
|
"fontSource": 0,
|
||||||
"fontWidth": 1,
|
"fontWidth": 1,
|
||||||
|
"lineSpacing": 0.1,
|
||||||
"glowingLine": 0,
|
"glowingLine": 0,
|
||||||
"horizontalSync": 0,
|
"horizontalSync": 0,
|
||||||
"jitter": 0,
|
"jitter": 0,
|
||||||
@@ -722,6 +733,7 @@ QtObject {
|
|||||||
"fontName": "TERMINUS",
|
"fontName": "TERMINUS",
|
||||||
"fontSource": 0,
|
"fontSource": 0,
|
||||||
"fontWidth": 1,
|
"fontWidth": 1,
|
||||||
|
"lineSpacing": 0.1,
|
||||||
"glowingLine": 0.1476,
|
"glowingLine": 0.1476,
|
||||||
"horizontalSync": 0,
|
"horizontalSync": 0,
|
||||||
"jitter": 0.099,
|
"jitter": 0.099,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
|
* Copyright (c) 2013-2021 "Filippo Scognamiglio"
|
||||||
* https://github.com/Swordfish90/cool-retro-term
|
* https://github.com/Swordfish90/cool-retro-term
|
||||||
@@ -36,11 +37,13 @@ QtObject {
|
|||||||
|
|
||||||
property int pixelSize: lowResolutionFont ? _font.pixelSize : targetPixelHeight
|
property int pixelSize: lowResolutionFont ? _font.pixelSize : targetPixelHeight
|
||||||
|
|
||||||
// Line spacing stays absolute for low-res fonts; for high-res fonts it's a factor of target size.
|
// Line spacing expressed as a relative factor for all fonts.
|
||||||
property int lineSpacing: lowResolutionFont ? _font.lineSpacing : Math.round(targetPixelHeight * _font.lineSpacing)
|
property real lineSpacingFactor: appSettings.lineSpacing
|
||||||
|
property int lineSpacing: Math.round(targetPixelHeight * lineSpacingFactor)
|
||||||
|
|
||||||
// Use total line height (glyph + spacing) for scaling computations on low-res fonts.
|
// Use total line height (glyph + spacing) for scaling computations on low-res fonts.
|
||||||
property real nativeLineHeight: _font.pixelSize + _font.lineSpacing
|
property real nativeLineHeight: _font.pixelSize + Math.round(
|
||||||
|
_font.pixelSize * lineSpacingFactor)
|
||||||
property real targetLineHeight: targetPixelHeight + lineSpacing
|
property real targetLineHeight: targetPixelHeight + lineSpacing
|
||||||
|
|
||||||
// Scale low-res font textures to hit the target line height; high-res fonts don't need scaling.
|
// Scale low-res font textures to hit the target line height; high-res fonts don't need scaling.
|
||||||
@@ -65,9 +68,7 @@ QtObject {
|
|||||||
name: "TERMINUS_SCALED"
|
name: "TERMINUS_SCALED"
|
||||||
text: "Terminus"
|
text: "Terminus"
|
||||||
source: "fonts/terminus/TerminusTTF-4.49.3.ttf"
|
source: "fonts/terminus/TerminusTTF-4.49.3.ttf"
|
||||||
lineSpacing: 1
|
|
||||||
pixelSize: 12
|
pixelSize: 12
|
||||||
baseScaling: 3.0
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
}
|
}
|
||||||
@@ -75,9 +76,7 @@ QtObject {
|
|||||||
name: "EXCELSIOR_SCALED"
|
name: "EXCELSIOR_SCALED"
|
||||||
text: "Fixedsys Excelsior"
|
text: "Fixedsys Excelsior"
|
||||||
source: "fonts/fixedsys-excelsior/FSEX301-L2.ttf"
|
source: "fonts/fixedsys-excelsior/FSEX301-L2.ttf"
|
||||||
lineSpacing: 0
|
|
||||||
pixelSize: 16
|
pixelSize: 16
|
||||||
baseScaling: 2.4
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_16_SCALED"
|
fallbackName: "UNSCII_16_SCALED"
|
||||||
@@ -86,9 +85,7 @@ QtObject {
|
|||||||
name: "GREYBEARD_SCALED"
|
name: "GREYBEARD_SCALED"
|
||||||
text: "Greybeard"
|
text: "Greybeard"
|
||||||
source: "fonts/greybeard/Greybeard-16px.ttf"
|
source: "fonts/greybeard/Greybeard-16px.ttf"
|
||||||
lineSpacing: 1
|
|
||||||
pixelSize: 16
|
pixelSize: 16
|
||||||
baseScaling: 3.0
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_16_SCALED"
|
fallbackName: "UNSCII_16_SCALED"
|
||||||
@@ -97,9 +94,7 @@ QtObject {
|
|||||||
name: "COMMODORE_PET_SCALED"
|
name: "COMMODORE_PET_SCALED"
|
||||||
text: "Commodore PET"
|
text: "Commodore PET"
|
||||||
source: "fonts/pet-me/PetMe.ttf"
|
source: "fonts/pet-me/PetMe.ttf"
|
||||||
lineSpacing: 0
|
|
||||||
pixelSize: 8
|
pixelSize: 8
|
||||||
baseScaling: 3.5
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_8_SCALED"
|
fallbackName: "UNSCII_8_SCALED"
|
||||||
@@ -108,9 +103,7 @@ QtObject {
|
|||||||
name: "COZETTE_SCALED"
|
name: "COZETTE_SCALED"
|
||||||
text: "Cozette"
|
text: "Cozette"
|
||||||
source: "fonts/cozette/CozetteVector.ttf"
|
source: "fonts/cozette/CozetteVector.ttf"
|
||||||
lineSpacing: 1
|
|
||||||
pixelSize: 13
|
pixelSize: 13
|
||||||
baseScaling: 3.3
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
}
|
}
|
||||||
@@ -118,9 +111,7 @@ QtObject {
|
|||||||
name: "UNSCII_8_SCALED"
|
name: "UNSCII_8_SCALED"
|
||||||
text: "Unscii 8"
|
text: "Unscii 8"
|
||||||
source: "fonts/unscii/unscii-8.ttf"
|
source: "fonts/unscii/unscii-8.ttf"
|
||||||
lineSpacing: 0
|
|
||||||
pixelSize: 8
|
pixelSize: 8
|
||||||
baseScaling: 3.5
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_8_SCALED"
|
fallbackName: "UNSCII_8_SCALED"
|
||||||
@@ -129,9 +120,7 @@ QtObject {
|
|||||||
name: "UNSCII_8_THIN_SCALED"
|
name: "UNSCII_8_THIN_SCALED"
|
||||||
text: "Unscii 8 Thin"
|
text: "Unscii 8 Thin"
|
||||||
source: "fonts/unscii/unscii-8-thin.ttf"
|
source: "fonts/unscii/unscii-8-thin.ttf"
|
||||||
lineSpacing: 0
|
|
||||||
pixelSize: 8
|
pixelSize: 8
|
||||||
baseScaling: 3.5
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_8_SCALED"
|
fallbackName: "UNSCII_8_SCALED"
|
||||||
@@ -140,9 +129,7 @@ QtObject {
|
|||||||
name: "UNSCII_16_SCALED"
|
name: "UNSCII_16_SCALED"
|
||||||
text: "Unscii 16"
|
text: "Unscii 16"
|
||||||
source: "fonts/unscii/unscii-16-full.ttf"
|
source: "fonts/unscii/unscii-16-full.ttf"
|
||||||
lineSpacing: 0
|
|
||||||
pixelSize: 16
|
pixelSize: 16
|
||||||
baseScaling: 2.4
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_16_SCALED"
|
fallbackName: "UNSCII_16_SCALED"
|
||||||
@@ -151,9 +138,7 @@ QtObject {
|
|||||||
name: "APPLE_II_SCALED"
|
name: "APPLE_II_SCALED"
|
||||||
text: "Apple ]["
|
text: "Apple ]["
|
||||||
source: "fonts/apple2/PrintChar21.ttf"
|
source: "fonts/apple2/PrintChar21.ttf"
|
||||||
lineSpacing: 3
|
|
||||||
pixelSize: 8
|
pixelSize: 8
|
||||||
baseScaling: 3.5
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_8_SCALED"
|
fallbackName: "UNSCII_8_SCALED"
|
||||||
@@ -162,20 +147,7 @@ QtObject {
|
|||||||
name: "ATARI_400_SCALED"
|
name: "ATARI_400_SCALED"
|
||||||
text: "Atari 400-800"
|
text: "Atari 400-800"
|
||||||
source: "fonts/atari-400-800/AtariClassic-Regular.ttf"
|
source: "fonts/atari-400-800/AtariClassic-Regular.ttf"
|
||||||
lineSpacing: 3
|
|
||||||
pixelSize: 8
|
pixelSize: 8
|
||||||
baseScaling: 3.5
|
|
||||||
lowResolutionFont: true
|
|
||||||
isSystemFont: false
|
|
||||||
fallbackName: "UNSCII_8_SCALED"
|
|
||||||
}
|
|
||||||
ListElement {
|
|
||||||
name: "IBM_EGA_8x8"
|
|
||||||
text: "IBM EGA 8x8"
|
|
||||||
source: "fonts/oldschool-pc-fonts/PxPlus_IBM_EGA_8x8.ttf"
|
|
||||||
lineSpacing: 3
|
|
||||||
pixelSize: 8
|
|
||||||
baseScaling: 3.5
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_8_SCALED"
|
fallbackName: "UNSCII_8_SCALED"
|
||||||
@@ -184,9 +156,16 @@ QtObject {
|
|||||||
name: "COMMODORE_64_SCALED"
|
name: "COMMODORE_64_SCALED"
|
||||||
text: "Commodore 64"
|
text: "Commodore 64"
|
||||||
source: "fonts/pet-me/PetMe64.ttf"
|
source: "fonts/pet-me/PetMe64.ttf"
|
||||||
lineSpacing: 0
|
|
||||||
pixelSize: 8
|
pixelSize: 8
|
||||||
baseScaling: 3.5
|
lowResolutionFont: true
|
||||||
|
isSystemFont: false
|
||||||
|
fallbackName: "UNSCII_8_SCALED"
|
||||||
|
}
|
||||||
|
ListElement {
|
||||||
|
name: "IBM_EGA_8x8"
|
||||||
|
text: "IBM EGA 8x8"
|
||||||
|
source: "fonts/oldschool-pc-fonts/PxPlus_IBM_EGA_8x8.ttf"
|
||||||
|
pixelSize: 8
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_8_SCALED"
|
fallbackName: "UNSCII_8_SCALED"
|
||||||
@@ -195,9 +174,7 @@ QtObject {
|
|||||||
name: "IBM_VGA_8x16"
|
name: "IBM_VGA_8x16"
|
||||||
text: "IBM VGA 8x16"
|
text: "IBM VGA 8x16"
|
||||||
source: "fonts/oldschool-pc-fonts/PxPlus_IBM_VGA_8x16.ttf"
|
source: "fonts/oldschool-pc-fonts/PxPlus_IBM_VGA_8x16.ttf"
|
||||||
lineSpacing: 3
|
|
||||||
pixelSize: 16
|
pixelSize: 16
|
||||||
baseScaling: 2.0
|
|
||||||
lowResolutionFont: true
|
lowResolutionFont: true
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
fallbackName: "UNSCII_16_SCALED"
|
fallbackName: "UNSCII_16_SCALED"
|
||||||
@@ -206,7 +183,6 @@ QtObject {
|
|||||||
name: "TERMINUS"
|
name: "TERMINUS"
|
||||||
text: "Terminus"
|
text: "Terminus"
|
||||||
source: "fonts/terminus/TerminusTTF-4.49.3.ttf"
|
source: "fonts/terminus/TerminusTTF-4.49.3.ttf"
|
||||||
lineSpacing: 0.1
|
|
||||||
pixelSize: 35
|
pixelSize: 35
|
||||||
lowResolutionFont: false
|
lowResolutionFont: false
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
@@ -215,7 +191,6 @@ QtObject {
|
|||||||
name: "HACK"
|
name: "HACK"
|
||||||
text: "Hack"
|
text: "Hack"
|
||||||
source: "fonts/hack/Hack-Regular.ttf"
|
source: "fonts/hack/Hack-Regular.ttf"
|
||||||
lineSpacing: 0.1
|
|
||||||
pixelSize: 35
|
pixelSize: 35
|
||||||
lowResolutionFont: false
|
lowResolutionFont: false
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
@@ -224,7 +199,6 @@ QtObject {
|
|||||||
name: "FIRA_CODE"
|
name: "FIRA_CODE"
|
||||||
text: "Fira Code"
|
text: "Fira Code"
|
||||||
source: "fonts/fira-code/FiraCode-Medium.ttf"
|
source: "fonts/fira-code/FiraCode-Medium.ttf"
|
||||||
lineSpacing: 0.1
|
|
||||||
pixelSize: 35
|
pixelSize: 35
|
||||||
lowResolutionFont: false
|
lowResolutionFont: false
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
@@ -233,7 +207,6 @@ QtObject {
|
|||||||
name: "IOSEVKA"
|
name: "IOSEVKA"
|
||||||
text: "Iosevka"
|
text: "Iosevka"
|
||||||
source: "fonts/iosevka/IosevkaTerm-ExtendedMedium.ttf"
|
source: "fonts/iosevka/IosevkaTerm-ExtendedMedium.ttf"
|
||||||
lineSpacing: 0.1
|
|
||||||
pixelSize: 35
|
pixelSize: 35
|
||||||
lowResolutionFont: false
|
lowResolutionFont: false
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
@@ -242,7 +215,6 @@ QtObject {
|
|||||||
name: "JETBRAINS_MONO"
|
name: "JETBRAINS_MONO"
|
||||||
text: "JetBrains Mono"
|
text: "JetBrains Mono"
|
||||||
source: "fonts/jetbrains-mono/JetBrainsMono-Medium.ttf"
|
source: "fonts/jetbrains-mono/JetBrainsMono-Medium.ttf"
|
||||||
lineSpacing: 0.1
|
|
||||||
pixelSize: 35
|
pixelSize: 35
|
||||||
lowResolutionFont: false
|
lowResolutionFont: false
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
@@ -251,7 +223,6 @@ QtObject {
|
|||||||
name: "IBM_3278"
|
name: "IBM_3278"
|
||||||
text: "IBM 3278"
|
text: "IBM 3278"
|
||||||
source: "fonts/ibm-3278/3270-Regular.ttf"
|
source: "fonts/ibm-3278/3270-Regular.ttf"
|
||||||
lineSpacing: 0.2
|
|
||||||
pixelSize: 32
|
pixelSize: 32
|
||||||
lowResolutionFont: false
|
lowResolutionFont: false
|
||||||
isSystemFont: false
|
isSystemFont: false
|
||||||
@@ -261,14 +232,14 @@ QtObject {
|
|||||||
Component.onCompleted: addSystemFonts()
|
Component.onCompleted: addSystemFonts()
|
||||||
|
|
||||||
function addSystemFonts() {
|
function addSystemFonts() {
|
||||||
var families = monospaceSystemFonts;
|
var families = monospaceSystemFonts
|
||||||
for (var i = 0; i < families.length; i++) {
|
for (var i = 0; i < families.length; i++) {
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
console.log("Adding system font: ", families[i])
|
console.log("Adding system font: ", families[i])
|
||||||
}
|
}
|
||||||
fontlist.append(convertToListElement(families[i]))
|
fontlist.append(convertToListElement(families[i]))
|
||||||
}
|
}
|
||||||
appSettings.updateFont();
|
appSettings.updateFont()
|
||||||
}
|
}
|
||||||
|
|
||||||
function convertToListElement(family) {
|
function convertToListElement(family) {
|
||||||
@@ -276,7 +247,6 @@ QtObject {
|
|||||||
"name": family,
|
"name": family,
|
||||||
"text": family,
|
"text": family,
|
||||||
"source": "",
|
"source": "",
|
||||||
"lineSpacing": 0.1,
|
|
||||||
"pixelSize": 30,
|
"pixelSize": 30,
|
||||||
"baseScaling": 1.0,
|
"baseScaling": 1.0,
|
||||||
"lowResolutionFont": false,
|
"lowResolutionFont": false,
|
||||||
|
|||||||
@@ -152,6 +152,24 @@ ColumnLayout {
|
|||||||
text: Math.round(widthChanger.value * 100) + "%"
|
text: Math.round(widthChanger.value * 100) + "%"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Label {
|
||||||
|
text: qsTr("Line Spacing")
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Slider {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
id: lineSpacingChanger
|
||||||
|
onValueChanged: appSettings.lineSpacing = value
|
||||||
|
value: appSettings.lineSpacing
|
||||||
|
stepSize: 0.01
|
||||||
|
from: 0.0
|
||||||
|
to: 1.0
|
||||||
|
}
|
||||||
|
SizedLabel {
|
||||||
|
text: Math.round(lineSpacingChanger.value * 100) + "%"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
GroupBox {
|
GroupBox {
|
||||||
|
|||||||
Reference in New Issue
Block a user