Home » U++ Library support » Draw, Display, Images, Bitmaps, Icons » Variable pitch fonts
Variable pitch fonts [message #24212] |
Tue, 05 January 2010 17:41  |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
Not sure which forum this should live in.
In my software I have a large number of custom controls and the user is permitted to change the fonts/colours etc. that these use.
On Linux there appear to be variable pitch fonts, which cause a vertical offset to all the text drawn with those fonts. I've checked TheIde and discovered a check for Font::FIXEDPITCH. This solves the problem by preventing the user from selecting a variable pitch font, but I have an obvious question remaining:
How are you supposed to draw variable pitch fonts? There certainly doens't seem to be any special code in the CtrlLib library to handle it. Either the font height being returned wrong or there should be a negative y offset applyed to both clipping space and text coords before drawing.
Also, the TheIde strangely doesn't display variable-pitch fonts in it's Format setup window even though the code looks like it should.
Cheers
[Updated on: Tue, 05 January 2010 17:43] Report message to a moderator
|
|
|
|
|
Re: Variable pitch fonts [message #24255 is a reply to message #24240] |
Thu, 07 January 2010 17:13   |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
Ah, that makes sense then. I always think of pitch as up/down, like a flying a plane 
Still leaves me with the problem of fonts incorrectly reporting their heights though, I haven't had a chance to look further into it yet.
[Updated on: Thu, 07 January 2010 17:49] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat Mar 25 09:47:33 CET 2023
Total time taken to generate the page: 0.01867 seconds
|