Improvement: all fonts now have a custom default width, this allows to have more uniform sizes across fonts and different rasterizations. Small tweaks in font sizes.

This commit is contained in:
Filippo Scognamiglio
2014-12-12 01:38:32 +01:00
parent 30cc2a5e9c
commit 94131a24ad
6 changed files with 40 additions and 18 deletions

View File

@@ -105,14 +105,12 @@ Item{
FontLoader{ id: fontLoader }
function handleFontChange(fontSource, pixelSize, lineSpacing, screenScaling){
function handleFontChange(fontSource, pixelSize, lineSpacing, screenScaling, fontWidth){
fontLoader.source = fontSource;
font.pixelSize = pixelSize;
font.family = fontLoader.name;
var fontWidth = 1.0 / appSettings.fontWidth;
width = Qt.binding(function() {return Math.floor(fontWidth * terminalContainer.width / screenScaling);});
width = Qt.binding(function() {return Math.floor(terminalContainer.width / (screenScaling * fontWidth));});
height = Qt.binding(function() {return Math.floor(terminalContainer.height / screenScaling);});
scaleTexture = Math.max(Math.round(screenScaling / appSettings.scanline_quality), 1.0);