Need help with Handwriting Font

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Need help with Handwriting Font

Post by Psymon »

Hey there, folks! I took a break from type design for a while, but recently got back into it again, with the hopes of creating my very first handwriting-style (cursive) font, one based on that of my favourite author, Henry David Thoreau.

When I first dipped my toe in type design a couple decades ago, one of my first thoughts was how wonderful it would be to create a font from his handwriting, but as fans and scholars of his work are quite familiar with, Thoreau's scrawl was notoriously illegible at times -- and so I just never really pursued the idea, thinking that it would just be impossible, a futile effort.

But then a couple years ago I discovered his earlier essays from his college years, and they weren't so bad at all! And so, starting with those as my basis, off I went to at least give it a shot -- and much to my own great surprise, I think it's turning out okay!

Here are three samples, each showing an excerpt written in Thoreau's own original hand, along with a transcription done with my font. If I do say so myself, for my very first handwriting/cursive font (with letters connected and everything), I don't think I did too badly, eh? :)

College Essay Handwriting-Font Comparison 2a.jpg
College Essay Handwriting-Font Comparison 2a.jpg (1.14 MiB) Viewed 7089 times

College Essay Handwriting-Font Comparison 2b.jpg
College Essay Handwriting-Font Comparison 2b.jpg (354.96 KiB) Viewed 7089 times

College Essay Handwriting-Font Comparison 2e.jpg
College Essay Handwriting-Font Comparison 2e.jpg (1.15 MiB) Viewed 7089 times


Here's my questions, which brought me here today...

Firstly, as you can see in Thoreau's original hand, his crossbar for the lowercase "t" is usually much, much more exaggerated than how mine ended up in the font. I shortened it up a bit (width-wise) because I was concerned that I might run into issues sometimes -- but now I'm not sure if I would.

Is there any reason that I should not do so, should not just go ahead and make the crossbar longer, to better reflect Thoreau's actual handwriting?

Also, I would just LOVE to be able to do those little swashy things he does whenever there's an e, n or r (and perhaps other characters) at the end of a word -- but I don't know how.

I know how to do ligatures, but how do you get a font to swap out a letter for another when it's at the end of a word? I think that's a "contextual alternate," isn't it? I can't seem to find any sort of info or tutorial on how to go about creating those, though.

Please do correct me if I'm headed down the wrong path -- but I am most certainly open to any suggestions that anyone might have to make my font "more like Thoreau" in any ways!

If you'd like to try it out yourself, I've created a web page where you can do so here (trying different sample texts, or typing in your own)...

http://www.psymon.com/fonts/thoreau.html

And if you'd like to check out my font itself, you can find the always-latest version (which is updated regularly, as I'm working on it) here...

http://www.psymon.com/fonts/fonts/Walden.ttf

Much, much thanks and appreciation for any help and/or suggestions that anyone might have! :)
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Need help with Handwriting Font

Post by Psymon »

Oh, another question... for this particular font, I haven't bothered to kern the uppercase with the uppercase -- I just can't see that it would make for a very good font at all used in that way, and find it hard to see that anyone would write in ALL CAPS with it.

Is that a terrible no-no? Should I trouble myself to kern it all (uppercase with itself) anyway?
Erwin Denissen
Moderator
Moderator
Posts: 11155
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Need help with Handwriting Font

Post by Erwin Denissen »

Yes, you will need a contextual substitution if you want to use an alternative glyph for a specific letter at the end of a word.

The best place for such contextual lookup is probably the swsh feature.

I don't have a basic sample for you right now, but this topics discusses an even more advanced way to make a script handwriting font:
viewtopic.php?f=3&t=5804

I think it is best to wait and see if people would like kerning between uppercase letters.
Erwin Denissen
High-Logic
Proven Font Technology
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Need help with Handwriting Font

Post by Psymon »

Oh, that's great! I did try searching in here for "contextual alternates," but for some reason didn't come across that page.

Looks like I have some reading/studying to do, but that's excellent, thanks so much, Erwin! :)
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Need help with Handwriting Font

Post by Psymon »

Okay, I read through that whole thread! But I'm a bit lost. You were very graciously helping that person accomplish virtually the same thing, but you did so by just sending him a pre-done script to get started -- I can't just take your script and load it into my font, though, because then I would lose all the kerning, etc. that I've done so far.

Or am I missing something here?

In any case, I would naturally like to learn how to do this from scratch, myself -- so I thought I would just go ahead and poke around, give it a shot.

So in the OTD, in the panel on the left I clicked on Scripts -> Latin (latn) -> Default;

Right-clicked on that and chose "Add Feature," and then in that dialog clicked "Known Feature" -- but I don't know which to select.

For this particular font, as I described in my original post, I guess I'm only striving to do alternate "enders" -- at least for the moment, anyway -- but I don't know which option to choose for that. I see these to choose from...

Contextual Alternates (calt)
Contextual Ligatures (clig)
Contextual Swash (cswh)

...and I saw another thread here somewhere, where you mentioned this..

Required Contextual Alternates (rclt)

Re my font, I do want these alternate enders to be "required," i.e. to be turned on all the time, by default -- I don't know if that's the one I should choose.

I suppose I may have more questions later on, but for the moment I can't get past that point! I think I could probably figure things out, though, if I simply know which one of those to choose (for this context).

Is there an explanation for all these various "known features" somewhere -- what each one does, when it's suitable to use it, etc.? That would be a nice reference. I look at that list of "known features" and I haven't got the slightest clue what half of them could mean -- I can only imagine that there must be whole new worlds of creativity lying in there, though, if I did. :)

Oh, and if only to get started on creating all the new glyphs I'll need for those alts, I'm assuming that those would just get added to my PUA (like my various ligatures, etc. are)? I've seen fonts -- can't remember what the name for this is -- where you have multiple versions/alternates of each and every letter, all within the Basic Latin charset.

Am I going to have to start doing weird stuff like that with my glyphs, too (as opposed to just adding new glyphs to my PUA)? I hope not -- I tried something like that before (forget what I was trying to do) and it made my head explode. :shock:
Erwin Denissen
Moderator
Moderator
Posts: 11155
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Need help with Handwriting Font

Post by Erwin Denissen »

For now don't worry about which OpenType feature you want to use. You can easily change it to another feature, so better first make it work. Then later experiment to see if the feature you intend to use is also available in the word processing software and DTP applications.

The alternative glyphs can remain unmapped, but if you want to provide a way for people to access them even when they use software than does not support OpenType layout features, then you could map them to a codepoint in the private use area.
Erwin Denissen
High-Logic
Proven Font Technology
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Need help with Handwriting Font

Post by Psymon »

Erwin Denissen wrote: Sat Sep 19, 2020 12:29 pm For now don't worry about which OpenType feature you want to use. You can easily change it to another feature, so better first make it work. Then later experiment to see if the feature you intend to use is also available in the word processing software and DTP applications.
I don't understand that. How can I "make it work" if I don't even know which one of those options to choose from? I do want the feature to be "turned on" by default (if/when the software allows it), but I don't know if that means that I should use the "Required Contextual Alternates (rclt)" one.

On the other hand, what I want to do with those enders is a bit "swashy," so would I choose the "Contextual Swash (cswh)" one???

As for what software it'll work in, I don't know where to look to find that out (unless I have the software). Personally, I use Photoshop mostly, or use my fonts embedded in ebooks and/or web pages -- especially for the latter, it would be great if whichever feature is supported.

But I haven't got the slightest clue how to choose between the available options. :roll:
Erwin Denissen
Moderator
Moderator
Posts: 11155
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Need help with Handwriting Font

Post by Erwin Denissen »

Try this to see if it work in Photoshop. You can also try if it works if you change the feature from calt to cswh or swsh. Within the OpenType Designer, right-click a feature to change the tag.

Code: Select all

script latn {
  feature ContextualAlternates1;
}

class @latn_letters [A-Z];

feature ContextualAlternates1 calt {
  lookup ChainingContext1;
}

lookup ChainingContext1 {
  ignore context @latn_letters (@latn_letters);
  context @latn_letters;
  sub 0 SingleSubstitution1;
}

lookup SingleSubstitution1 {
  sub A -> A.swash;
}
Erwin Denissen
High-Logic
Proven Font Technology
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Need help with Handwriting Font

Post by Psymon »

I don't know what that script is supposed to do, nor do I know what I'm supposed to do with it. I presume I copy/paste it into my code editor -- but where in that existing code do I put that bit? Anywhere? Doesn't stuff in there have to be in a certain sequence?

I've never worked in code -- not in font code, anyway. I just go in there to confirm that my script has no errors (and to find those errors), but I've never edited anything right in the code there because I don't know what I'm doing.
Erwin Denissen
Moderator
Moderator
Posts: 11155
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Need help with Handwriting Font

Post by Erwin Denissen »

Make a copy of your current project, so you can import these OpenType layout features. Within the OpenType Designer click the Code Editor button at the bottom and copy and paste the code from the previous post.

Do ensure your font has glyphs with these names:

A, B, C... X, Y, Z, and A.swash

Then type some text to see how it affects your font, for example:

A AB BA BAB ABBA
ContextualSwash2.png
ContextualSwash2.png (104.6 KiB) Viewed 7004 times
The chaining contact lookup contains two rules. The first one is an exception rule, which makes sure all Latin letters (Input) that are followed by a Latin character (Lookahead) are skipped. Then second rule triggers the substitution lookup for all Latin characters (Input). The first rule makes sure the second rule is only applied with Latin characters that are not followed by a Latin character, which is generally the end of a word. Hope this clarifies it.
Erwin Denissen
High-Logic
Proven Font Technology
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Need help with Handwriting Font

Post by Psymon »

Erwin Denissen wrote: Sat Sep 19, 2020 6:10 pm Make a copy of your current project, so you can import these OpenType layout features. Within the OpenType Designer click the Code Editor button at the bottom and copy and paste the code from the previous post.
That's one of the things that confused me -- WHERE, exactly, do I pste that code into my current code? Anywhere? My understanding was that everything in one's code had to be in a certain sequence -- I have no idea what that order is, but I figured it was kind-of like with HTML web pages, where you have to have the <head> first, then the <body>, and things should be in a certain order.

Thanks so much for your reply, though! I confess I'm a bit confused about the rest of what you wrote, but I have a feeling it'll make better sense to me once I actually try it -- not sure if I'll get to it tonight, though, but I'll certainly let you know if/when I've achieved success (or am still confused).

PS... I was almost about to submit this reply, but I'm left wondering... rather than cut'n'paste your code, wouldn't I accomplish the same thing simply by "adding new item" myself? That's what I had wanted to do, of course, i.e. learn how to do this myself, rather than copying/pasting code from others.

Surely that would work, too, to just "add new item(s)," selecting the various options to basically end up with what you had?

I do sincerely apologize if I'm frustrating you -- if I seem dumb and ignorant about this, it's because, well, I fully admit that I am! :roll:
Erwin Denissen
Moderator
Moderator
Posts: 11155
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Need help with Handwriting Font

Post by Erwin Denissen »

Open your font in FontCreator. Ensure it has characters A, B, C, etc. and also a glyph named A.swash

Open the OpenType Designer dialog. In the left pane, select Scripts -> Latin (latn) -> Default. If that is not available, click the plus sign in the upper toolbar and add it.

Ensure the font contains the class @latn_letters.

Select Lookups in the left pane and click the plus sign to add a substitution lookup. Add this substitunio item to it:
Input: A
Output: A.swash

Now select the contextual alternates (calt) feature. Again if it is not available, add it through the same plus sign button, but be sure you have selected Scripts -> Latin (latn) -> Default, as that determines what options you have when you click the plus sign.

Now add the two rules. The first one is an exception rule, which makes sure all Latin letters (Input) that are followed by a Latin character (Lookahead) are skipped. Thus add @latn_letters to Input and also add @latn_letters to Lookahead.

Then second rule triggers the substitution lookup for all Latin characters (Input). Thus add @latn_letters to Input. Finally add the substitution table SingleSubstitution1 to the second rule.

Let us know your results.
Erwin Denissen
High-Logic
Proven Font Technology
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Need help with Handwriting Font

Post by Psymon »

Okay, I hope you're around, Erwin! I finally got started on this, and a few steps in I'm already stuck.
Erwin Denissen wrote: Sun Sep 20, 2020 6:52 pm Open your font in FontCreator. Ensure it has characters A, B, C, etc. and also a glyph named A.swash
I don't "have" to name it A.swash, do I? I can just leave it with the default unicode name and then just use that, can't I? I suppose I can see that things might be easier to look up (for me) with a more descriptive name, but I kind-of like keeping the unicode names.

Maybe I'm being dumb about that, I don't know, but I guess I'm just wondering if I actually "have" to rename it to that (specifically).

This here is where I'm especially stumped, though...
Ensure the font contains the class @latn_letters.
I don't know what you mean, what I'm supposed to do with that -- what do I put in that class? Nothing at all? I can't add other letters to that, because those already have their own classes, and then I'll run into problems if I try to put the same letters into multiple classes.

Hope you're around! All my enthusiasm this morning has just come to a grinding halt! :shock:

EDIT: If you did mean to make that @latn_letters class just an empty class, FC won't let me create an empty class. I find this so confusing! And I'm confused about your instructions right after that, too...
Select Lookups in the left pane and click the plus sign to add a substitution lookup. Add this substitunio item to it:
Input: A
Output: A.swash
Currently in my font, I have these lookups: SlashToFraction; StandardFractions; Alternative Fractions; Ligatures; and PairAdjustment.

Each of those contains a bunch of "items," of course.

But in your instruction there you're saying that I should add in a new "item," but not to any lookup "group" (or whatever you call those), like those other various lookups do?

I find this stuff so, so terribly confusing. :(
Psymon
Posts: 444
Joined: Wed Mar 30, 2011 5:50 pm

Re: Need help with Handwriting Font

Post by Psymon »

Oh, I do have another question regarding this particular font, separate from all this other contextual alternates stuff.

If you look at the screenshots in my original post, and look at Thoreau's lowercase "t" in all of them, his crossbar is most often a lot longer than how I ended up doing my "t." I did shorten up the crossbar a bit, because I thought perhaps I might run into issues somewhere -- but will I? Thoreau's "t" really quite consistently has a very long crossbar, sometimes extending right across the entire word! I wouldn't go that far, of course, but if only in striving to make this font look/work as closely to his original handwriting as possible, would there be any problem with my stretching out the crossbar some more?

Bear in mind that "legibility" isn't exactly what I'm striving for here -- Thoreau was NOT known for his legibility, but quite the contrary. I'm striving for emulation, not legibility.
Erwin Denissen
Moderator
Moderator
Posts: 11155
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: Need help with Handwriting Font

Post by Erwin Denissen »

Psymon wrote: Mon Sep 21, 2020 2:50 pm Okay, I hope you're around, Erwin! I finally got started on this, and a few steps in I'm already stuck.
Erwin Denissen wrote: Sun Sep 20, 2020 6:52 pm Open your font in FontCreator. Ensure it has characters A, B, C, etc. and also a glyph named A.swash
I don't "have" to name it A.swash, do I? I can just leave it with the default unicode name and then just use that, can't I? I suppose I can see that things might be easier to look up (for me) with a more descriptive name, but I kind-of like keeping the unicode names.

Maybe I'm being dumb about that, I don't know, but I guess I'm just wondering if I actually "have" to rename it to that (specifically).
If your glyph has a Unicode name, then it is mapped to a codepoint. I wonder what character it is.
Psymon wrote: Mon Sep 21, 2020 2:50 pm I don't know what you mean, what I'm supposed to do with that -- what do I put in that class? Nothing at all? I can't add other letters to that, because those already have their own classes, and then I'll run into problems if I try to put the same letters into multiple classes.

Hope you're around! All my enthusiasm this morning has just come to a grinding halt! :shock:

EDIT: If you did mean to make that @latn_letters class just an empty class, FC won't let me create an empty class. I find this so confusing! And I'm confused about your instructions right after that, too...
It is fine to have a glyph in more than one class. It is only an issue when you use them in class based kerning.
Psymon wrote: Mon Sep 21, 2020 2:50 pm Currently in my font, I have these lookups: SlashToFraction; StandardFractions; Alternative Fractions; Ligatures; and PairAdjustment.

Each of those contains a bunch of "items," of course.

But in your instruction there you're saying that I should add in a new "item," but not to any lookup "group" (or whatever you call those), like those other various lookups do?
The substitution lookup initially is not used, as we later connect it to the contextual lookup.
Erwin Denissen
High-Logic
Proven Font Technology
Post Reply