Bug 938 : Vertical (Y) text alignment differs between loadFont() and createFont()
Last modified: 2008-11-24 12:34




Status:
RESOLVED
Resolution:
INVALID -
Priority:
P2
Severity:
normal

 

Reporter:
Stefan Nowak
Assigned To:
fry

Attachment Type Created Size Actions
Comparison of the vertical (Y) text alignment offsets between loaded and created fonts image/png 2008-10-02 07:12 30.05 KB
Source Code + Bitmap Fonts in Data Directory --- in a ZIP Archive application/zip 2008-10-02 07:15 83.35 KB

Description:   Opened: 2008-10-02 07:10
DESCRIPTION:
If you use the same font in the same size:
* through the different methods loadFont() and createFont()
* and either place it at a point (x,y) or into a text-box (x,y,width,height)
* with different vertical (Y-axis) alignments,
you get 6 different results!!!

Hence for me, working with text() is currently more or less trial and error.

I am not sure whether this is a bug, or has some reason.
If this particular behaviour is intended, then please someone add an explanation here and to
the respective reference pages.

ENVIRONMENT:
Processing 0148, MacOSX 10.4.11, Java 1.5.0_13

CODE:
See attachment for code and screenshot.
Additional Comment #1 From Stefan Nowak 2008-10-02 07:12
edit]
Comparison of the vertical (Y) text alignment offsets between loaded and
created fonts
Additional Comment #2 From Stefan Nowak 2008-10-02 07:15
edit]
Source Code + Bitmap Fonts in Data Directory --- in a ZIP Archive
Additional Comment #3 From fry 2008-10-07 14:50
Have you read the reference to textAlign() closely? Nothing in your example
seems particularly out of place, outside of the fact that native fonts vs
bitmapped fonts may be reporting a slightly different textAscent() value,
which is affecting placement slightly, but is not something we can fix.
Additional Comment #4 From fry 2008-11-24 12:34
No response, closing bug.