gotcha

Author Topic: Inkscape with Fontforge/Fonts, steps incl.  (Read 3971 times)

July 23, 2017, 12:41:46 PM
Read 3971 times

flamingolady

  • IC Mentor

  • Offline
  • ******
  • Flamingo Lady

  • 154
  • Gender
    Female

    Female
I hope this is ok to post here, it's not quite a tutorial.  I wanted to create a general discussion thread where font makers can help each other in using Inkscape to create fonts, particularly in using with FontForge (FF); and to have an ongoing thread where we can discuss issues in any of the steps.  (side note: I haven't found a forum at FF, if there is one, pls let me know).

I'll start by giving a very general step by step how to and sharing issues I've had/having.  At this time I have successfully created a font (TTF), have loaded it onto my system, and can use it.  :yay:  But, it's not kerned/placed correctly, looks terrible, and I'm having issues with placement, which I need help on, from someone who understands ascent/descent in FF. There are a number of manuals and guides to browse through before starting, FF is a good starting place. Having said that, below are the steps involved.

Basic first steps:  Start by figuring out the height, width, weight, and size of the glyphs (aka alpha characters, numbers, symbols, etc.), then set locking guides. This will be your template.  Save a backup at this point.  This step is more complicated than it seems, you have to account for caps, lower case (lc), upper case (uc), alpha char. etc., which go above or below the base line, and symbols that go above/below. Set a base guideline, then ascent and descent guides, width guides, etc. You need to pick an EM size (I chose 1000), and set your page size as well as set the Viewbox to 0,0,1000,1000 for FF.

Q1.  Does anyone know how to make and use an FF Inkscape template?  I see they have a way to save as SVG template, but I haven't figured it out.  Seems it's a way to save just the guides but not sure of that (guides have their own layer in FF).  (Note at this time there are some guides issues in Inkscape, the guidelines become unlocked; it's a reported bug, so be careful).  I can't figure out how to merge the guide layer with a specific font, so I didn't use it.  Anyone know how to use it?   

Start drawing.  I used the awesome Power Stroke (PS) to draw the fonts, but this is not necessary. PS allows a simplified way to create specifics (butt end, round, fat/thin sizes, etc.).  And that part was much harder than I ever expected, PS has it's own mini issues, but the results were good, and to me, worth using it.  (pls refer to my Power Stroke thread on this forum to get an idea). 

After trudging through that process,  :uhoh:  convert each glyph to a path (tip, save a backup file with the power stroked glyphs BEFORE converting, it comes in handy for later use).  Thought that would be the easy part, but alas, no, converting to a path creates it's own issues.  One strange effect I noticed is that after converting I get a lot of instances of a duplicated node on top of itself.  That wouldn't be an issue except that even after deleting it and/or moving the original node, it reappears over and over (like an unwanted ghost), and that causes issues on FF.  Sometimes you can fix the original issue and the next node in line starts acting up. 

Ok, so after converting my glyphs to a path, and fixing/tweaking them, each glyph has to be saved as an individual file.  I used a single Inkscape layer.  I named the layer with a simple a, A, 1, etc.  Unsure if you can separate the guidelines onto a separate layer.  For english you'll end up with 26 lc files, 26 uc files, 10 numbers, and many symbols (=,."(!, etc). 

Now on to FF.

July 23, 2017, 01:25:26 PM
Reply #1

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Great idea!

Personally I never delved into font creating and fontforge, though having it around on the desktop. Probably because I find inkscape struggling with creating texts in general.
Anyway, for professional help, typophile is a good place to look around.

July 23, 2017, 03:24:55 PM
Reply #2

flamingolady

  • IC Mentor

  • Offline
  • ******
  • Flamingo Lady

  • 154
  • Gender
    Female

    Female
Contd.

It’s time to upload your glyphs into FF.  Use File Import to do this, upload A into their A slot, B into the B slot, and so forth.  FF is set to use with Macs and I use Win 7, so I had some hiccups. FF’s main screen is a template format that you import/upload each glyph into, one by one.  Drop and drag wasn't doable so the upload process took awhile.  I had issues with opening and getting to the directory/subdir my files are located in. There is a Fav button, hint; use it to mark your font directories. Folders can be discussed further if anyone gets stuck as I did. 

A (metrics) box can be opened to view the glyph and also make changes directly to the nodes, splines, extrema; and to work out validation issues.  Width and placement of the glyph must be assigned, as well as kerning, line spacing, and assigning spacing for special circumstances like where to place the tilde; assigning kerning pairs, (like when placing the 'o' next to the 'T', or the 'i' next to another glyph, considering that the 'i' is not as wide as the other characters).  I am just starting to look at the kerning pairs, and proper glyph placements. 

Once glyphs are imported and you are happy with the glyph's placement, run the 'validation' test on them, either individually or select all and run it globally.  There is also a Find Errors menu where you can pinpoint specific issues.  The biggest issue is that FF wants each node to be placed on an integer number.  (ex of non-integers would be 1.0127 and 3.773).  Inkscape has a lot of issues with that, it allows non-integers, and even when you move or transform a node to an integer no., it doesn't always stay put (ideally Inkscape needs to fix).  FF has a way to globally fix those errors and other errors automatically as well.  The next largest error are extrema issues.  I have no idea what this is, but there is a way to automatically fix the problem.  I think it has to do with adding nodes to the spline, but unsure.  If anyone knows, please let me know. 

Once you fix errors and pass all of the validation requests, you are ready to save as a font.  FF offers various ways to save, OT, TTF, SVG font, etc.  I chose TTF, then installed it (in the C:Windows font folder, but can be done via the control panel).   Note: FF has issues with Windows, so you may have to drop and drag it into the Windows folder.  Once installed, typically you must close any programs you are using and re-open, in order to see the and use the font.  Some programs may require a re-boot (Word only required an open/close).  And voila, you have a font.  Initially I couldn’t find my installed font, later realized that if you do not title your font, then it auto names it as ‘Untitled’.  (I initially had some hiccups with naming/titling, as that page uses ascii characters).  Then test it of course and look for line spacing, size, placement and kerning issues, fix and re-save until you are happy with your final output.  That’s the gist of how to build a font.

There's of course much more to consider.  I'm by no means an expert, nor am I well versed in FF. These are basic steps; if I can create a font, you can too, even if and your issues are different than mine.  It's worth considering it all before deciding if you really want to jump into font design.

dee



July 23, 2017, 03:31:53 PM
Reply #3

flamingolady

  • IC Mentor

  • Offline
  • ******
  • Flamingo Lady

  • 154
  • Gender
    Female

    Female
Lazur, thanks for that link, and your support.  Will def take a look at that site.  I wanted to create a couple of fonts to use in Word and mostly to use on images that I create and sell in Microstock (things like 'Happy Birthday', Congratulations, that sort of thing), Stock sites have issues approving fonts, but if I'm the creator it's not such an ordeal.  I don't use Inkscape for general typing.  I guess me doing fonts is like you creating filters!  lol. 


ok, here's my FF issue, that I just can't seem to get right.  Probably something very simple, but after two days of trying, my eyes are crossed and I have a 'font' headache!

note:  for reference reasons, I number questions so it's easier to reference answers back to the original question.

Q 2.  Can someone help me with glyph placement in FF?  Two of my glyphs are higher up than the others.  When I select all glyphs and chg the numbers in Element > font info > general, I would expect all of the glyphs to be at the same height/baseline but that isn't the case. 

Background info:  initially selected all glyphs and globally changed the settings, and they were all perfect.  I needed to re-work two glyphs in Inkscape, did that, reloaded into FF and now can't figure out how to get those two glyphs to line up with the others, no matter what I choose.  I 'fiddled' with all sorts of things to no avail, and now can't get anything properly placed.  Most of the glyphs are too low, and two are too high. They all have the same x/y/w/h in Inkscape as all the others. Note, being a test font I didn't have risers or serifs, etc; and I didn't use negative xy numbers, just started from one low baseline and worked up.  What could I be doing wrong?   

dee

July 23, 2017, 08:44:58 PM
Reply #4

flamingolady

  • IC Mentor

  • Offline
  • ******
  • Flamingo Lady

  • 154
  • Gender
    Female

    Female
Here's a print screen of the font I, very basic, for learning purposes mostly.  I was able to globally set the ascent/descent and manually moved the B & D to lower them into place, though they appear to be ‘off’ when looking at the guideline layer.  I wonder if somehow, somewhere there is an offset that needs to be changed.  Still no idea of what I did wrong, and still need to do kerning and pairing, etc., but wanted to show this.