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