mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-11-04 00:52:11 +00:00 
			
		
		
		
	Linespacing is now proportional to font size.
This commit is contained in:
		@@ -99,7 +99,7 @@ Item{
 | 
			
		||||
 | 
			
		||||
    FontLoader{
 | 
			
		||||
        property int pixelSize: fontlist.get(font_index).pixelSize
 | 
			
		||||
        property int lineSpacing: fontlist.get(font_index).lineSpacing
 | 
			
		||||
        property real lineSpacing: fontlist.get(font_index).lineSpacing
 | 
			
		||||
        id: currentfont
 | 
			
		||||
        source: fontlist.get(font_index).source
 | 
			
		||||
    }
 | 
			
		||||
@@ -117,43 +117,43 @@ Item{
 | 
			
		||||
            text: "Terminus (Modern)"
 | 
			
		||||
            source: "fonts/modern-terminus/TerminusTTF-4.38.2.ttf"
 | 
			
		||||
            pixelSize: 22
 | 
			
		||||
            lineSpacing: 2
 | 
			
		||||
            lineSpacing: 0.1
 | 
			
		||||
        }
 | 
			
		||||
        ListElement{
 | 
			
		||||
            text: "Commodore PET (1977)"
 | 
			
		||||
            source: "fonts/1977-commodore-pet/COMMODORE_PET.ttf"
 | 
			
		||||
            pixelSize: 15
 | 
			
		||||
            lineSpacing: 3
 | 
			
		||||
            lineSpacing: 0.2
 | 
			
		||||
        }
 | 
			
		||||
        ListElement{
 | 
			
		||||
            text: "Apple ][ (1977)"
 | 
			
		||||
            source: "fonts/1977-apple2/PrintChar21.ttf"
 | 
			
		||||
            pixelSize: 18
 | 
			
		||||
            lineSpacing: 2
 | 
			
		||||
            lineSpacing: 0.2
 | 
			
		||||
        }
 | 
			
		||||
        ListElement{
 | 
			
		||||
            text: "Atari 400-800 (1979)"
 | 
			
		||||
            source: "fonts/1979-atari-400-800/ATARI400800_original.TTF"
 | 
			
		||||
            pixelSize: 16
 | 
			
		||||
            lineSpacing: 2
 | 
			
		||||
            lineSpacing: 0.25
 | 
			
		||||
        }
 | 
			
		||||
        ListElement{
 | 
			
		||||
            text: "Commodore 64 (1982)"
 | 
			
		||||
            source: "fonts/1982-commodore64/C64_User_Mono_v1.0-STYLE.ttf"
 | 
			
		||||
            pixelSize: 16
 | 
			
		||||
            lineSpacing: 2
 | 
			
		||||
            lineSpacing: 0.25
 | 
			
		||||
        }
 | 
			
		||||
        ListElement{
 | 
			
		||||
            text: "Atari ST (1985)"
 | 
			
		||||
            source: "fonts/1985-atari-st/AtariST8x16SystemFont.ttf"
 | 
			
		||||
            pixelSize: 18
 | 
			
		||||
            lineSpacing: 2
 | 
			
		||||
            lineSpacing: 0.2
 | 
			
		||||
        }
 | 
			
		||||
        ListElement{
 | 
			
		||||
            text: "IBM DOS (1985)"
 | 
			
		||||
            source: "fonts/1985-ibm-pc-vga/Perfect DOS VGA 437.ttf"
 | 
			
		||||
            pixelSize: 20
 | 
			
		||||
            lineSpacing: 2
 | 
			
		||||
            lineSpacing: 0.1
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -86,9 +86,11 @@ Item{
 | 
			
		||||
 | 
			
		||||
            Component.onCompleted: {
 | 
			
		||||
                var scaling_factor = shadersettings.font_scaling * shadersettings.window_scaling;
 | 
			
		||||
                font.pointSize = shadersettings.font.pixelSize * scaling_factor;
 | 
			
		||||
                var font_size = shadersettings.font.pixelSize * scaling_factor;
 | 
			
		||||
                var line_spacing = Math.round(shadersettings.font.lineSpacing * font_size);
 | 
			
		||||
                font.pointSize = font_size;
 | 
			
		||||
                font.family = shadersettings.font.name;
 | 
			
		||||
                setLineSpacing(shadersettings.font.lineSpacing);
 | 
			
		||||
                setLineSpacing(line_spacing);
 | 
			
		||||
                forceActiveFocus();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<!DOCTYPE QtCreatorProject>
 | 
			
		||||
<!-- Written by QtCreator 3.0.1, 2014-04-18T11:56:15. -->
 | 
			
		||||
<!-- Written by QtCreator 3.0.1, 2014-05-08T21:05:06. -->
 | 
			
		||||
<qtcreator>
 | 
			
		||||
 <data>
 | 
			
		||||
  <variable>ProjectExplorer.Project.ActiveTarget</variable>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user