mirror of
				https://github.com/Swordfish90/cool-retro-term.git
				synced 2025-10-30 22:54:21 +00:00 
			
		
		
		
	Fix: sometimes scaling was wrong. Per-font line spacing is actually now used.
This commit is contained in:
		| @@ -64,7 +64,6 @@ Item{ | |||||||
|  |  | ||||||
|     property real font_scaling: 1.0 |     property real font_scaling: 1.0 | ||||||
|     property var font: currentfont |     property var font: currentfont | ||||||
|     property real fontSize: currentfont.pixelSize * font_scaling |  | ||||||
|     property int font_index: 0 |     property int font_index: 0 | ||||||
|     property var fonts_list: fontlist |     property var fonts_list: fontlist | ||||||
|  |  | ||||||
| @@ -103,43 +102,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: 0 |             lineSpacing: 2 | ||||||
|         } |         } | ||||||
|         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: 0 |             lineSpacing: 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: 0 |             lineSpacing: 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: 0 |             lineSpacing: 2 | ||||||
|         } |         } | ||||||
|         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: 0 |             lineSpacing: 2 | ||||||
|         } |         } | ||||||
|         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: 0 |             lineSpacing: 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: 0 |             lineSpacing: 2 | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -74,8 +74,9 @@ Item{ | |||||||
|             onUpdatedImage: {blurredSource.live = true;livetimer.restart();} |             onUpdatedImage: {blurredSource.live = true;livetimer.restart();} | ||||||
|  |  | ||||||
|             Component.onCompleted: { |             Component.onCompleted: { | ||||||
|                 font.pointSize = shadersettings.fontSize; |                 font.pointSize = shadersettings.font.pixelSize * shadersettings.font_scaling; | ||||||
|                 font.family = shadersettings.font.name; |                 font.family = shadersettings.font.name; | ||||||
|  |                 setLineSpacing(shadersettings.font.lineSpacing); | ||||||
|                 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-03-31T21:06:48. --> | <!-- Written by QtCreator 3.0.1, 2014-04-02T19:08:53. --> | ||||||
| <qtcreator> | <qtcreator> | ||||||
|  <data> |  <data> | ||||||
|   <variable>ProjectExplorer.Project.ActiveTarget</variable> |   <variable>ProjectExplorer.Project.ActiveTarget</variable> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user