[CLOSED] Vertical Metrics bug
Posted: Thu Jun 23, 2011 2:19 am
There seems to be a problem with vertical metrics in Scanahand 3.1 Premium Edition, Windows 7 Ultimate Edition.
I filled a basic 1-page template (http://www.royalcomics.org/font_things/ ... dified.png) with default metrics (http://www.royalcomics.org/font_things/ ... terSet.xml) and after generating got a font (http://www.royalcomics.org/font_things/ ... mplate.ttf), that has glyphs on wrong vertical position or wrong vertical metrics.
Letters in the generated font are too high (or the vertical metrics in the font are wrong), although they are right on the printed and scanned template images as well as on the program (Template Editor / Advanced Settings / Positioning / Cell Ratios). According to the template, the top point of uppercase letters is approximately on Ascender guide line, and above that line there should be plenty of space (exactly 30% of font height because the distance between Ascender Guide Line and Top line is 30% of cell height). But there is no such space, only about 1% (!) and the font is unusable.
I have no idea why this occurs, but in my thoughts there is no other way to determine font vertical metrics than those ones that are on the printed template and on the program Template Editor. When a user is drawing glyphs on template, he/she draws them according to guide lines. If some letter is drawn on wrong vertical position accidentally, the mistake will (and MUST) remain in the generated font. The Scanahand should not adjust vertical positions at all, because the program cannot know if it is a mistake or not. In my bug example Scanahand has not honored the metrics of the template (24-12-20-14-10), but has made some own assumptions.
This is a clear example, but I made also other tests, and Scanahand always forget the vertical metrics of the template and make some own assumptions that are possibly based on glyph vertical positions (correct me if I'm wrong).
The default metrics has the following values:
Caption 20,00 Top
Top 24
Ascender 12
x-Height 20
Baseline 14
Descender 10
(TOTAL SUM 80)
The meaning of these values is not mentioned anywhere in the program GUI or help. I made some tests and figured out that Top, Ascender, x-Height, Baseline and Descender are not guide line positions (as I first thought), but heights of AREAS between guide lines. For example Ascender is in font terminology the distance between Ascender and baseline, but in Scanahand Ascender is the height of area between Ascender-line and x-Height-line. And "height of area" is not absolute value and not percentage of cell height, it is a relative value to the TOTAL SUM of other metrics (TOTAL SUM is height of cell without Caption). For example, if Ascender is 12 and TOTAL SUM of metrics (Top, Ascender, x-Height, Baseline and Descender) is 80, the Ascender is 12/80 = 15 % of cell height without caption.
The definition of metrics seems to be the following:
Top - relative height of area between font top line and Ascender-line (font top line is the bottom line of Caption if Caption is positioned on top of cell, otherwise top of cell)
Ascender - relative height of area between Ascender-line and x-Height-line
x-Height - relative height of area between x-Height-line and Baseline
Baseline - relative height of area between Baseline and Descender
Descender - relative height of area between Descender and font bottom line (font bottom line is the top line of Caption if Caption is positioned on bottom of cell, otherwise bottom of cell)
The minimum value for each metric is 0 and maximum is 1000. "Relative height of area" is relative to the TOTAL SUM of metrics. If all metrics has maximum value 1000, the maximum TOTAL SUM of metrics is 5000. Greater values means greater accuracy. This should be mentioned in help.
I filled a basic 1-page template (http://www.royalcomics.org/font_things/ ... dified.png) with default metrics (http://www.royalcomics.org/font_things/ ... terSet.xml) and after generating got a font (http://www.royalcomics.org/font_things/ ... mplate.ttf), that has glyphs on wrong vertical position or wrong vertical metrics.
Letters in the generated font are too high (or the vertical metrics in the font are wrong), although they are right on the printed and scanned template images as well as on the program (Template Editor / Advanced Settings / Positioning / Cell Ratios). According to the template, the top point of uppercase letters is approximately on Ascender guide line, and above that line there should be plenty of space (exactly 30% of font height because the distance between Ascender Guide Line and Top line is 30% of cell height). But there is no such space, only about 1% (!) and the font is unusable.
I have no idea why this occurs, but in my thoughts there is no other way to determine font vertical metrics than those ones that are on the printed template and on the program Template Editor. When a user is drawing glyphs on template, he/she draws them according to guide lines. If some letter is drawn on wrong vertical position accidentally, the mistake will (and MUST) remain in the generated font. The Scanahand should not adjust vertical positions at all, because the program cannot know if it is a mistake or not. In my bug example Scanahand has not honored the metrics of the template (24-12-20-14-10), but has made some own assumptions.
This is a clear example, but I made also other tests, and Scanahand always forget the vertical metrics of the template and make some own assumptions that are possibly based on glyph vertical positions (correct me if I'm wrong).
The default metrics has the following values:
Caption 20,00 Top
Top 24
Ascender 12
x-Height 20
Baseline 14
Descender 10
(TOTAL SUM 80)
The meaning of these values is not mentioned anywhere in the program GUI or help. I made some tests and figured out that Top, Ascender, x-Height, Baseline and Descender are not guide line positions (as I first thought), but heights of AREAS between guide lines. For example Ascender is in font terminology the distance between Ascender and baseline, but in Scanahand Ascender is the height of area between Ascender-line and x-Height-line. And "height of area" is not absolute value and not percentage of cell height, it is a relative value to the TOTAL SUM of other metrics (TOTAL SUM is height of cell without Caption). For example, if Ascender is 12 and TOTAL SUM of metrics (Top, Ascender, x-Height, Baseline and Descender) is 80, the Ascender is 12/80 = 15 % of cell height without caption.
The definition of metrics seems to be the following:
Top - relative height of area between font top line and Ascender-line (font top line is the bottom line of Caption if Caption is positioned on top of cell, otherwise top of cell)
Ascender - relative height of area between Ascender-line and x-Height-line
x-Height - relative height of area between x-Height-line and Baseline
Baseline - relative height of area between Baseline and Descender
Descender - relative height of area between Descender and font bottom line (font bottom line is the top line of Caption if Caption is positioned on bottom of cell, otherwise bottom of cell)
The minimum value for each metric is 0 and maximum is 1000. "Relative height of area" is relative to the TOTAL SUM of metrics. If all metrics has maximum value 1000, the maximum TOTAL SUM of metrics is 5000. Greater values means greater accuracy. This should be mentioned in help.