28 |
(very desirable). Also, the origin of the text, and the direction. |
(very desirable). Also, the origin of the text, and the direction. |
29 |
|
|
30 |
The solution is to pass nothing about what should be done to the width |
The solution is to pass nothing about what should be done to the width |
31 |
of the string, but simply the unit square of the font. I.e.: the |
of the string, but simply the unit square of the font. The font will |
32 |
font will render itself with baseline somewhere between y=1 and y=0, and |
have its normal aspect ratio if the unit vectors are equal, i.e. |
33 |
the line height such that the similar line rendered above would have its |
if the distances (0,1)..(0,0) and (0,1)..(1,1) are the same. |
|
y=1 coordinate at this vob's y=0. |
|
34 |
|
|
35 |
(Benja:) I object to this peg on the grounds that without a clear |
TextVob will take a flag ``baselined``, indicating whether the baseline |
36 |
definition where the baseline will be, it is impossible to do |
should be at y=1 or not. That is, ``baselined`` affects the layout |
37 |
text layout. I also object because even though I asked for it, |
in the following way: |
|
there is no explanation of the considerations above, just a |
|
|
(fuzzy) rule how it should work (``:-(``). With the rule given, |
|
|
the baseline could be at y=0 or y=1, if the rendering is only |
|
|
consistent in this choice, but text layout based on that is |
|
|
absolutely impossible! |
|
38 |
|
|
39 |
The font will have its normal aspect ratio if the unit vectors |
true |
40 |
are equal, i.e. if the distances (0,1)..(0,0) and (0,1)..(1,1) are the same. |
The baseline will be at y=1. This allows different fonts to be |
41 |
|
rendered on the same line by matching their baselines |
42 |
|
false |
43 |
|
The baseline will be between y=1 and y=0, so that as much of the |
44 |
|
text as possible will fit. This allows easy placement of a single |
45 |
|
line (or several lines) of text of the same font into a box. |
46 |
|
In Java terms, baseline y coord = 1-descent. |
47 |
|
|
48 |
A table-driven lookup needs to be done to find the correct point size |
A table-driven lookup needs to be done to find the correct point size |
49 |
for a given height in the AWT rendering code. |
for a given height in the AWT rendering code. |