|
Post by Roger Cabo on Nov 14, 2022 16:25:05 GMT 1
Hi everyone,
I like to stretch a text. Does the Font object has a property to be able in GB32? I found the ability to rotate text. But not stretch.
Thank you
|
|
|
Post by (X) on Nov 14, 2022 17:56:08 GMT 1
Did you want to avoid Direct2D?
|
|
|
Post by Roger Cabo on Nov 14, 2022 23:02:08 GMT 1
Did you want to avoid Direct2D? It's a simple Form display where I write into with Text.. If I can write into the same Form with D2D would be nice..
But for sure I can not rework the complete program to d2d. :-) Does D2D does have Clear Type?
|
|
|
Post by (X) on Nov 15, 2022 22:41:04 GMT 1
It seems DrawText and Text commands will let you change the font Width independant of the Height properties. .Text properties of a control (Label, TextBox, RichEdit...) do not seem to let you change the Font Width independantly.
|
|
|
Post by Roger Cabo on Nov 16, 2022 16:40:39 GMT 1
Thanks great Demo! I think there is perhaps an issue with GB32. * Seems WIN_1_Paint is called directly after the program launch. The Font looks normal. * Resize the main form, then the Font parameter will be taken in to account and the Font change. The Text should be directly Underlined and StrikeOuted.. ? Or I'm doing anything wrong?
Global fnt As Handle Font "Consolas" Font Italic 0, Weight 00 Font Orientation 0, StrikeOut 1, Underline 1, Escapement 0 Font Family FF_ROMAN, CharSet OEM_CHARSET , Pitch FIXED_PITCH Font Height 100 Font Width 100 Font To fnt SetFont fnt
OpenW 1 Win_1.AutoRedraw = -1
Do : Sleep : Until Me Is Nothing
FreeFont fnt
Sub Win_1_Paint Output = Win_1 Font Height 100 : Font Width 50 : Font To fnt : SetFont fnt DrawText 0, 200, 800, 400, "Hello World", 0
|
|
|
Post by (X) on Nov 17, 2022 0:35:10 GMT 1
I don't know why "Win_1_Paint" is not called by GFA after "OpenW 1", but, you can simply call it yourself.
Global fnt As Handle Font "Consolas" Font Italic 0, Weight 00 Font Orientation 0, StrikeOut 1, Underline 1, Escapement 0 Font Family FF_ROMAN, CharSet OEM_CHARSET , Pitch FIXED_PITCH Font Height 100 Font Width 100 Font To fnt SetFont fnt
OpenW 1 Win_1.AutoRedraw = -1
Win_1_Paint
Do : Sleep : Until Me Is Nothing
FreeFont fnt
Sub Win_1_Paint Output = Win_1 Font Height 100 : Font Width 50 : Font To fnt : SetFont fnt DrawText 0, 200, 800, 400, "Hello World", 0
|
|