You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a small font like TomThumb the first line gets printed outside the screen.
(i have to add 13 padding spaces before the string to be printed)
side question:
can i reduce the size of the whitespace between words and the newlines?
(actually the whitespace takes 5 pixels with my 3-pixel width font)
The text was updated successfully, but these errors were encountered:
this has been sitting around for a long time.
The dimensions of a font are part of the font definition. So when you say your whitespace is five pixels wide, that's consistent with it's definition { 0, 0, 0, 4, 0, 1 }, // 0x20 '
if the following character has an xOffset of 1, that would make it five pixels.
Same goes for the actual height of the font:
they're all defined to be 3 pixels high, but some have an additional offset that would make them bigger.
For fonts that small, I assume that freetype just has issues rendering them onto a small cell without rounding errors. You can certainly go ahead and manually adapt those values, although I figure that would be a whole lot of work without a graphical editor that understands the GFXfont format (of which there's none).
As for why your String is showing outside the screen - you say "first line" but then say you need to pad with spaces - could it be that the first line is printed above the visible area? Keep in mind that the flexible fonts are not top left pixel bound but have a baseline that runs at the bottom of the characters with things like p,q, j and y reaching below it. So if you print someting to screen position (0,0) it would be expected that only the the character portions reaching below the baseline would show.
When using a small font like TomThumb the first line gets printed outside the screen.
(i have to add 13 padding spaces before the string to be printed)
side question:
can i reduce the size of the whitespace between words and the newlines?
(actually the whitespace takes 5 pixels with my 3-pixel width font)
The text was updated successfully, but these errors were encountered: