PDA

View Full Version : Font size?



JosephE
20-07-2010, 06:14
If i try to change my font to a smaller size than 12, it looks like it only changes the width, not the height. It needs to change both by the correct proportions.

I like the consolas font, but it does the same with courier new. At least on my computer.

Screenshot attached.

I'd also be able to specify that I don't want italics for comments, and i don't want keywords bold. The blue sticks out quite enough for me.

My apologies haha. I'm rather picky about my environment. I guess it's because I stare at it too much.

Petr Schreiber
20-07-2010, 07:49
Hi JosephE,

that is interesting observation, just tried it here and can confirm it really changes just one dimension of the characters.
Good it is not specific to your PC only, it will be easier to fix.


Petr

JosephE
20-07-2010, 21:45
I'm glad to know it's not just me as well.

I think 12 is too big, my dream font is consolas 10, but not when it's stretched haha.

ErosOlmi
21-07-2010, 08:12
I'm checking font problems.
I'm not sure if I will be able to release a fix before I go on holiday but if not I will return with a solution.

Ciao
Eros

ErosOlmi
21-07-2010, 12:08
I'm trying to figure out the problem.
I tested Consolas 12 and Consolas 10, see attached images.
To me it seems it is working as expected.

I'm under Windows 7 64Bit
I see JosephE is posting from a Windows 7 PC while Petr from a Windows XP.
There must be something I still do not get.
Checking ...

Petr Schreiber
21-07-2010, 12:14
Hi Eros,

I attach two screens, both are set up to Courier New size 8, the dark one is from ThinAIR and the brigh one from PB/IDE, where it looks correct to me.
In ThinAIR the characters are too wide, like deformed.


Petr

ErosOlmi
21-07-2010, 12:34
Thanks Petr.

Just one more help:
does that happen when you change font and confirm option dialog?
what happen when you close thinAir and re-open it? Still wrong proportions?

Ciao
Eros

Petr Schreiber
21-07-2010, 14:08
Hi Eros,

it looks the same just after change in Options and after thinAir reboot.


Petr

ErosOlmi
21-07-2010, 21:31
OK, I was finally able to replicate the problem under a Windows 2k Virtual Machine so I can test and find a solution.

ErosOlmi
21-07-2010, 22:38
Can you please check attached thinAir.exe

ATTENTION: before getting attached thinAir.exe, please do the following:

rename your current thinAir.exe to something like thinAir.exe.original
copy attached thinAir.exe
test it. When you will start font width will still be incorrect. Go to thinAir option dialog and confirm a desired font and confirm
delete thinAir.exe
rename thinAir.exe.original to thinAir.exe


I will waith for your replies.
Thanks a lot
Eros

JosephE
21-07-2010, 23:03
Wow. Whatever you did, that seems to do the trick.

I appreciate your hard work!! :)

I find it odd that it does it on Windows 2K machines, as well as my Windows 7 Computer!!

ErosOlmi
22-07-2010, 05:47
Thanks for your reply.
Fix will be present in next beta release.

To generate font, I use LOGFONT structure
In http://msdn.microsoft.com/en-us/library/dd145037(VS.85).aspx you can read:

The average width, in logical units, of characters in the font. If lfWidth is zero, the aspect ratio of the device is matched against the digitization aspect ratio of the available fonts to find the closest match, determined by the absolute value of the difference.

I was not filling LOGFONT.lfWidth element with ZERO assuming it was already ZERO while in some cases it can be different from zero.
So I just added LOGFONT.lfWidth = 0 and the trick seems done.

Eros

JosephE
22-07-2010, 06:30
That's awesome! I'm actually familiar with the logfont structure and I knew windows would figure the other proportion out for you. I didn't know you have to specifically specify 0 just in case. I appreciate all the time you put into that. It will make my time spent in thinAir much more enjoyable!

ErosOlmi
22-07-2010, 06:45
During summer I will add font styles to thinAir editor elements so you will be able to set or not bold style to keywords and other elements.

Petr Schreiber
22-07-2010, 07:30
Hi Eros,

the trick worked here as well, thanks! :)


Petr

JosephE
22-07-2010, 17:37
During summer I will add font styles to thinAir editor elements so you will be able to set or not bold style to keywords and other elements.

I would love that. Thanks in advance! :)