Template Editor help

Get help with Scanahand here. Please do not post feature requests or bug reports here.
Post Reply
jorlando
Posts: 8
Joined: Mon Apr 28, 2008 11:45 pm

Template Editor help

Post by jorlando »

Hi, I've been trying to make some templates with oversized cells for use on Signatures and Dingbats. I'm finding that the template editor allows me to make a template with cells that are horizontally much wider than what ScanaHand will vectorize into a glyph.

Heres an example XML for a 1x7 Template I tried (uses only the first 6 cells):

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<DATA>
  <Template>
      <Name>Sigs1x6</Name>
      <Columns>1</Columns>
      <Rows>7</Rows>
      <Characters>$41-$46</Characters>
      <PageRatioTopHeader>1</PageRatioTopHeader>
      <PageRatioHeaderBottom>15</PageRatioHeaderBottom>
      <CellRatioTopHeader>50</CellRatioTopHeader>
      <CellRatioHeaderAscender>49</CellRatioHeaderAscender>
      <CellRatioAscenderxHeight>0</CellRatioAscenderxHeight>
      <CellRatioxHeightBaseline>190</CellRatioxHeightBaseline>
      <CellRatioBaselineDescender>110</CellRatioBaselineDescender>
      <CellRatioDescenderBottom>20</CellRatioDescenderBottom>
  </Template>
</DATA>
In this template, ScanaHand vectorizes only about 60% of the horizontal space that appears within the cell on the printed template starting with the first marks that are detected going left to right in the cell. The remaining 40% of the cell is cropped. No tick mark or other visual queue is present to tell the user that the space beyond is unusable.

Am I doing something wrong? If its a limitation of ScanaHand, are there some guidelines I can follow?

In general, I'd really like some better documentation about template design using the editor, especially how to work with the cell ratios.

Thanks
Jeff
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Template Editor help

Post by Bhikkhu Pesala »

Scanahand seems to be vectorizing the whole width of the template OK, but its producing a glyph with an Advance width of 26,304, which seems to be wider than supported by Truetype fonts.

Unless Erwin has some other suggestions, I suspect that the only solution is to use two columns.

I got acceptable results by using two columns and seven rows.
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Erwin Denissen
Moderator
Moderator
Posts: 11107
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Template Editor help

Post by Erwin Denissen »

First of all, there is one known issue with custom templates:
A 1x1 grid won't be recognized by Scanahand, so have at least two columns or two rows..

I think Bhikkhu Pesala is right, there are some limits due to restrictions/ limits in the font specification. We can't bend those limits, but we can give guidelines to prevent one from hitting those limits.

Please send me your completed template, and I'll try to analyze the exact problem, and if possible I'll post a workaround here. Thanks!
Erwin Denissen
High-Logic
Proven Font Technology
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Template Editor help

Post by Bhikkhu Pesala »

The attached template gives some unpredictable results. The first time I tried, I got the attached font. Subsequent attempts have not been successful.
Signatures.png
Signatures.png (154.56 KiB) Viewed 26585 times
Attachments
Signatures.ttf
(12.34 KiB) Downloaded 913 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Template Editor help

Post by Bhikkhu Pesala »

Tried the same template again, and the font went completely wrong.
Signature Two.ttf
(13.91 KiB) Downloaded 961 times
Tried another new template, and this one worked OK.
Signature Three.ttf
(13.07 KiB) Downloaded 980 times
Used this template:
Attachments
Signature Three.png
Signature Three.png (213.89 KiB) Viewed 26573 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
jorlando
Posts: 8
Joined: Mon Apr 28, 2008 11:45 pm

Re: Template Editor help

Post by jorlando »

I attached the template & font below. The 1x7 font is uniformly cropped on the right side.

FWIW, I think the signature cells and all the other cells too in the standard templates are way too small. When people try to compress their signature or lettering while writing, its not natural and they aren't happy with the result. So I'm trying to create a set of templates thats large enough to promote natural signatures and hand lettering.

A related issue is that if the cell is made very large and the handwriting is small, the resulting glyph becomes too small. Apparently the glyph is a percentage of the cell height. The 200% scaling available is sometimes not enough. I'd like to have up to about 500% scaling available in ScanaHand.

I also have a 3x4 dingbat template with similar issues. Its the one mentioned in the previous thread. Approx. 20-25 % of that cell gets cropped.

It would be ideal if the template that prints out clearly distinguishes the usable from the non-usable area in both x and y axis.

Image

Jeff
Attachments
test1x7.ttf
(13.54 KiB) Downloaded 913 times
Erwin Denissen
Moderator
Moderator
Posts: 11107
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Template Editor help

Post by Erwin Denissen »

I've opened your font test1x7.ttf in FontCreator, and as you can see the glyph outlines are way over the limit.

To overcome this problem you should set the scale factor to a value less than 100%, or make smaller cells (e.g. increase the number of columns or decrease the number of rows). I know this is not what you want as you want larges glyphs displayed, but this is the only way to stay within the allowed area.


[Click the image in case you see a vertical scrollbar]
toolarge.png
toolarge.png (70.26 KiB) Viewed 26551 times
Just for comparison, here is the usual size of a glyph:
normalsize.png
normalsize.png (76.04 KiB) Viewed 26549 times
Erwin Denissen
High-Logic
Proven Font Technology
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Template Editor help

Post by Bhikkhu Pesala »

jorlando wrote:A related issue is that if the cell is made very large and the handwriting is small, the resulting glyph becomes too small. Apparently the glyph is a percentage of the cell height. The 200% scaling available is sometimes not enough.
I found that the way to work around this problem is to use a two column template, and to write small (actually normal sized handwriting) with a fine writer pen, but to save the template at 600 dpi instead of 300 dpi. The attached blank template is a 600 dpi PNG @ 256 colours, so it is only 92 Kbytes. So far I only tested with digital fonts filled in with IrfanPaint, but I think it will work well with neatly hand-written text too. Save as 600 JPG after filling it in and scanning. Scanahand should then give good results. Try one or two cells only for the first test. Use the standard 100% scaling in Scanahand.
Attachments
Signature.png
Signature.png (90.7 KiB) Viewed 26549 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Template Editor help

Post by Bhikkhu Pesala »

My method works as expected. The attached font is rough, as I filled in the template without much care, but each of the fourteen signatures was traced completely and fits within the acceptable glyph limits.
Attachments
Typographers.ttf
(26.39 KiB) Downloaded 957 times
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Erwin Denissen
Moderator
Moderator
Posts: 11107
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Template Editor help

Post by Erwin Denissen »

Based on Bhikkhu Pesala's findings and without going into too many details about the internals of our software I think the following guideline ensures your whole cell area is converted into a displayable glyph.

Use the default scale of 100% and keep the Column to Row ratio below 1 to 5.

So if you want 7 wide cells don't go for 1 column and 7 rows, but make a custom template with 2 columns and 4 rows and don't forget to set the scale to 100%.

Feel free to experiment with other settings and let us know your results.
Erwin Denissen
High-Logic
Proven Font Technology
jorlando
Posts: 8
Joined: Mon Apr 28, 2008 11:45 pm

Re: Template Editor help

Post by jorlando »

Thanks for the help. I'll stick to at least 2 columns & the proportions mentioned. That should allow for a good sized cell.

Erwin, Please post a tutorial or article about how to use the cell ratios in the advanced editor.

In page ratio for example, if I make the second number down smaller, the header space gets bigger. ( There are more labels than boxes so I'm not sure how to refer to the number ) Whats going on there?

or what does a header ratio of 24 mean? what is the unit? For that matter, what is a header?

I'm not trying to be a wise guy. I just want to learn how to get the most out of this excellent software.

Jeff
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Template Editor help

Post by Bhikkhu Pesala »

jorlando wrote:Erwin, Please post a tutorial or article about how to use the cell ratios in the advanced editor.

In page ratio for example, if I make the second number down smaller, the header space gets bigger. ( There are more labels than boxes so I'm not sure how to refer to the number ) Whats going on there?

or what does a header ratio of 24 mean? what is the unit? For that matter, what is a header?
The dialogue could have been labelled better.

On the left of the dialogue is the page header (where the logo is), on the right is the grid header where the caption is. A ratio doesn't have any units. If you make the second number smaller its ratio to the first number gets bigger. If you have a ratio of 1:1 then half the page will be taken up by the header with the logo.

On the cell ratios side of the dialogue: the area above the line that says "header" is where the grid's caption goes. Above the ascender line is the space for accents. Below the descender line is the bottom of the cell. The Cell Grid has seven lines, six gaps, and six fields for changing the ratios of those gaps.

Image
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
jorlando
Posts: 8
Joined: Mon Apr 28, 2008 11:45 pm

Re: Template Editor help

Post by jorlando »

Thanks very much for clearing this up. Makes sense to me now. I was getting along by trial and error but its better to understand.

With that in mind, please help me make the connection between the size of the cell in ScanaHand and the size of the resulting glyph in the font.

If I open the font in FontCreator and then open a glyph in the glyph editor, there is a y-axis label with the baseline at zero and values above and below. First, what is the y-axis unit? Then, how do the cell ratio settings in a Scanahand template translate to the position of the horizontal metrics and size of the glyph contours as viewed in the editor.

Thanks for tolerating my questions.

Jeff
Bhikkhu Pesala
Top Typographer
Top Typographer
Posts: 9869
Joined: Tue Oct 29, 2002 5:28 am
Location: Seven Kings, London UK
Contact:

Re: Template Editor help

Post by Bhikkhu Pesala »

The x and y axis units in FontCreator are called funits. There are 2048 funits to an em-square.

The numbers on the Scanahand template are ratios, not units. Refer to the default settings illustrated above. If my mental arithmetic (24+12+20+14+10) is correct, the grid size is 80% on the default template. The caption above the grid is 20%

If the x height is 1000 funits (20 on the Scanahand Template) and the Ascender is 12 on the Scanahand template, then the letter h (if drawn exactly from the baseline guide to the ascender guide), will be 1600 funits. The letter p will descend 500 funits below the baseline, with a total glyph height of 1500 funits.

You don't really need to think about funits — what matters is the proportions. How tall are the ascenders in relation to the x-height? How much space do you want to leave for accents above the Capitals and ascenders? Do some accents or subscripts need to fall below the descender line? It is good to leave a margin for error, because anything drawn outside the grid will be cropped.

If you want longer descenders, increase the value (14) between the descender line and baseline, and reduce the space below the descender and bottom of the grid (10).
My FontsReviews: MainTypeFont CreatorHelpFC15 + MT12.0 @ Win 10 64-bit build 19045.2486
Post Reply