META-THREAD Font Size and Grid calculation

Regarding the support problem as at early on 22 October 2008 in the following thread.

http://forum.high-logic.com:9080/t/font-size-and-grid-calculation/246/1

I have been trying to produce a test font and have produced some notes as I proceeded.

I wonder if some other readers would have a look through what I have produced please. I am thinking in terms of suggesting to the gentleman with the support question that he try downloading my font and printing out the sequence HHHHH at 18 point and finding out if it works as expected. However, I feel that I would like it critically reviewed by some other readers first. Does anyone have a 200 dot per inch printer and a rule so as to test it please?

I can happily make the font public domain then anyone who chooses can add some more letters or alter the font.

Yet first I need to know that I am not sending him off on a wild goose chase.

The question mentions product labelling and I named my font FONT VEG as I imagined a vegetable packing application!

The font is available as follows. There is only space, nonmarkingreturn and H done at present.

http://www.users.globalnet.co.uk/~ngo/FONTV001.TTF

Transcript of my notes follows.

William Overington

22 October 2008


Wednesday 22 October 2008

08:01 am

Suppose that the font is to be used at 18 point on a Windows system.

Suppose that the font is to have WinAscent at 2048 font units and WinDescent at 0 font units.

18 point is 1/4 of an inch and one inch is 25.4 mm.

Used at 18 point, this font will have 25.4/4 which is 6.35 mm represented by 2048 font units.

So 1 mm is represented by 2048/6.35 font units which is 322.51968503937007874015748031496 font units.

Only whole numbers of font units may be used, but keep the decimal until the final calculation has been completed.

So 4 mm is represented by 4*322.51968503937007874015748031496 font units, which is 1290.0787401574803149606299212598 font units.

So round that to 1290 font units and use 1290 font units as the Caps Height of the font.

So 3 mm is represented by 3*322.51968503937007874015748031496 font units, which is 967.5590551181102362204724409447 font units. Round this to 968 font units.

So 4.5 mm, the overall width of a glyph, is represented by 4.5*322.51968503937007874015748031496 font units, which is 1451.3385826771653543307086614171 font units. Round this to 1451 font units. This is the Advance Width of most glyphs (some might be narrower).

Start a new Unicode font FONT VEG 001 using FontCreator 5.6 with no outlines included.

Save as FONTV001.TTF.

Use Tools AutoNaming… to set the name as FONT VEG 001.

Save.

Use Format Settings… Metrics to set the metrics at 2048, 0, 0.

Save.

Right click on the space. Right click on Properties… and then on the General panel, set the Advance Width to 1451. Click on OK.

Right click on the nonmarkingreturn, which is located one cell to the left of the space. Right click on Properties… and then on the General panel, set the Advance Width to 1451. Click on OK.

Save.

Right click on the H. Right click on Properties… and then on the General panel, set the Advance Width to 1451. Click on OK.

Save

Click on the H and press Enter on the keyboard.

Cap Height will not be correct at present as the H has not yet been drawn and the Caps Height line goes to where the top of the glyph design for H is located.

The next stage is to draw a glyph for capital H.

In this font, this is intended to be done by drawing a rough H using Insert Contour… and, starting at the top left corner of the H, left click and move generally clockwise to draw 12 points in the outline of a capital H without any overlapping of lines and then click on the first point so as to close the contour.

Save.

Click the Fill Outines button on the toolbar once or twice as necessary so as to show the contour filled (to check that it has been closed) and then unfilled. Leave it unfilled so as to facilitate moving points around more clearly.

Now use View Mode Point.

The task now is to move the twelve points, one by one, so that the outline of the H becomes accurately as desired, at the correct size and at the correct place.

Where to place the glyph.

As 1.5 mm is needed between characters, try to put 0.75 mm each side with the H centred in the middle.

Remembering that 1 mm is represented in this font by 2048/6.35 font units which is 322.51968503937007874015748031496 font units, 0.75 mm is represented by 241.88976377952755905511811023618 font units, so use 242 font units.

So, start the left side of the H at 242 font units horizontally and complete it at 1210 font units, which is not the 1209 that 1451 - 242 produces, as I want the centre of the H to be a whole number without rounding.

So, remembering that the Caps Height is to be 1290, the four outer points of the H can be set at (242, 1290), (242, 0), (1210, 1290) and (1210, 0).

The placing of the four inner points of the ends of the verticals needs a decision as to how wide to make the verticals of the glyph design.

The overall width of the printing part of the H is 968 font units (that is, 1210 - 242).

The font needs to be able to have characters such as M and W each with a centre part, and there needs to be white space around a centre part, so the width really needs to be no more than 968/5 font units, which is 193.6 font units.

At 18 point, with 200 dots per inch resolution, there are 50 dots to 2048 font units, so each dot is 40.96 font units. So the line needs to be at least about 80 font units wide so as to get at least one dot printed regardless of how the system chooses to select how to place the dots with respect to the design of the letter.

Dividing 968 by 7 gives a value of 138.28571428571428571428571428571 font units.

Try 160 font units for the width of the verticals. That should hopefully give reasonably bold lines whilst not being too lacking in white space.

So the four inner ends of the verticals points of the H can be set at (402, 1290), (402, 0), (1050, 1290) and (1050, 0).

There remain four points to locate accurately. Their horizontal coordinates are known as they are on the inner verticals.

The width of the horizontal bar is to be 160 font units.

Half of the Caps Height is 645 font units, so, if it were in the middle vertically, the horizontal bar would go from 565 vertically to 725 vertically. Place it there for this test font.

Use Font Test… with a row of H characters typed in the test window to test the font.

Save the font.

Font Validate.

Install.

Test using WordPad.

Upload to the web.

09:16 am

Test the font at 18 point using Paint.

Enlarge x8 to view the pixel effect.

Test the font at 36 point using Paint, hoping that that simulates 200 dots per inch printing at 18 point.

Enlarge x8 to view the pixel effect.

09:24 am


Hi William,

I really appreciate you taking time out to work thru a support guide for me. It means alot. As I am now at home reading your guide, I will only be able to test out the steps tomorrow in office where FC is installed and test if it works to what I am expecting.

Again, I sincerely appreciate your 1.5 hrs of detailed guidance. I am speechless. (or maybe its the only way to stop this fella from posting more funny questions… :laughing: )


Oh by the way, its not that I am up WAY early this morning, just that I am from the Far East (Singapore to be exact) so our time zone is 7 hours apart as I noticed you are from the UK. I use to attend Leeds University in 1998. :slight_smile:
Have a great evening ahead mate! Cheers.

Hi William,

Your detailed step-through helped me quite a lot. I am able to come very close to the expected result, thanks to you. I had to do some minor adjustments but your detailed explanation enabled me to understand the concepts more. I also guess the label printer had some difference in the actual print vs the caluclations.

With the minor adjustments made, I am now able to just focus on creating the GLYPHs for those I require.

THANK YOU THANK YOU THANK YOU!!!

Thank you for your kind comments.

Regarding the glyphs and the development of your font.

As it happens, having produced the FONT VEG 001 font I tried adding a few other letters and, in the event, completed the alphabet.

I appreciate that, as you needed to make some minor adjustments to the H in order to get the desired end result on a particular printer, that the glyphs which I produced later for the other letters would not be directly usable in your system. Also, I appreciate that you may well prefer to design your own glyphs.

However, I am adding links to the development versions of the font in the hope that they might be of interest to you and maybe to some other readers as well.

I added some extra letters in the following font.

http://www.users.globalnet.co.uk/~ngo/FONTV002.TTF

I added some more letters in the following font.

http://www.users.globalnet.co.uk/~ngo/FONTV003.TTF

The following font has a complete alphabet and a complete set of digits.

http://www.users.globalnet.co.uk/~ngo/FONTV004.TTF

The following font has a redesigned glyph for K.

http://www.users.globalnet.co.uk/~ngo/FONTV005.TTF

http://forum.high-logic.com:9080/t/designing-glyphs-for-the-k-and-k-characters/2260/1

The following font has a redesigned .notdef glyph.

http://www.users.globalnet.co.uk/~ngo/FONTV006.TTF

The font has capitals and digits. In addition the glyphs for capitals are copied to the lowercase positions. The font also contains a / character and a hyphen.

For copying glyphs, if desired, the FONTV006.TTF font is the best one to use.

The reason why I thought that the collection of fonts might be useful to provide is because when I started making fonts I got into quite a muddle with font names and file names and trying later versions. There were problems with Windows not recognising a later version of a font because it had the same name and needing to reboot and that not always clearing the problem and so on. So I devised the system which I have used since and it works well. For each font that I wish to develop I devise a five-letter name. For this font FONTV is the five-letter name. So the first stage of development is in FONTV001.TTF and the second stage is in FONTV002.TTF and so on. The first stage has a font name of some text with space and 001 after it and the second stage has the same text with space and 002 after it. For this font FONT VEG is the text. When I have reached a result such as a complete alphabet, or after having taken a break, I move to the next stage by using Save As… and then using the Tools AutoNaming… facility.

This means that several versions of the font can be installed on the computer at the same time for comparison tests and that rebooting after installing is not needed. Also, if I try something and do not like the result, then I can go back to the previous version easily.

Also, while fontmaking I produce notes in a text file using the WordPad program.

For example, here is a section from the notes.


10:35 am

Save as FONTV002.TTF

Tools Autonaming… to set up as FONT VEG 002.

Try an E by adapting a copy of H.

Try an F by adapting a copy of E.

Duplicate capitals as lowercase.

Try a W by adapting a copy of H.
The centre of the glyph is at (242 + 1210)/2 which is 726.
So, a 160 wide vertical pale centred, runs from 646 horizontal to 806 horizontal.

Try a T by adapting a copy of W.

Try an O by adapting a copy of H.
Try to have flattened edges so that it will display solidly.
Use the Glyph Transformer to Thin 80 followed by Hollow 160.

Try a P by adapting copies of H and O.

Try a U by adapting a copy of O.

Try a D by adapting a copy of O.

Try a capital I by adapting a copy of T. This I is the same width as the T.

Try a B by adapting a copy of P.

Try a C by adapting a copy of O.

Try a G by adapting a copy of C.

Try an L by adapting a copy of E.

Try an S by adapting a copy of O.

Try a J by adapting copies of W and T.

12:02 pm


Making these notes as I proceed takes time, yet I have found that it is very useful to me to make the notes.

Each of the fonts FONT VEG 001, FONT VEG 002 and so on have version 1.00 as the version number.

However, these are development fonts and typically would not be published on the web.

When I wanted to publish a finished version to the web I would use a filename such as FONTVEG.TTF and start by Save As… from the latest development version. The finished version would have a name with no numbers after it.

So maybe FONT VEG would be the name of the finished font, though I could use a name such as FONT FOR LABELS if I decided later on a better name.

For example, the font which I developed as Pixel Text with numbers on the development versions became Sonnet to a Renaissance Lady when it was a finished font.

My own practice with the finished font is that I make the version number to be the stage number of the development font from which it is derived divided by 100.

So, if I were making FONTVEG.TTF from a copy of FONTV006.TTF then the font would have 0.06 as the version number.

The reason for this is that FONTVEG.TTF could be made available on the web with a link from a web page of my own or from a post in the High-Logic forum and the link would always be to the latest version of the font, so that if I later added to the font then the file name of the latest version of the font would be FONTVEG.TTF yet the version number would be a higher value.

When I make a finished version I remove the unused glyphs from the font. This is so that keying a character which is not in the font will display a .notdef glyph when the finished font is used, whereas keying a character which is not in the font with a development version of the font may display a space or may display a .notdef glyph depending upon whether or not there is an empty cell for that character in the development font.

I hope that this helps and that you enjoy producing the glyphs for your font.

William Overington

27 October 2008