How to create a large number of composites

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

How to create a large number of composites

Post by Dan Kreider »

Hi,

I need to create a large number of composites, since I am limited to using only standard ligatures to produce things like this:

Image

I'm planning on accomplishing it by something like this:

Image

...where each of the three positions could be a number, a line, or a space. I would make an @ prefix for each ligature, so user would input:

at_seven_five_three.liga
at_hyphenminus_hyphenminus_hyphenminus.liga, etc
@---
@-4-
@6!- (! for a space)
@!!2

but obviously there are a lot of combinations, since each position could be a number up to 9, a line, or a space! That's more than a thousand combinations. Ugh...

Is there a way I could batch this process? I need to use composites, but generate ligatures from them automatically.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: How to create a large number of composites

Post by Erwin Denissen »

You could try Insert Glyphs by Name and then provide a formula for each new glyph like:

at_seven_five_three.liga=at+seven+five+three

Etc.

Then the feature generator available from the upper left toolbar in the OpenType Designer should be able to create the ligature (if all glyph components within the glyph name exist in the font). Here is the generated fea code:

Code: Select all

lookup latn_liga { # GSUB lookup type Ligature
    sub at seven five three by seven_five_three.liga;
} latn_liga;
Erwin Denissen
High-Logic
Proven Font Technology
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: How to create a large number of composites

Post by Dan Kreider »

Is it correct that the glyphs themselves can be named whatever I want? So they could be 7, 5, 3, etc, and I would then type

at_seven_five_three.liga=@753

?

That would be faster...
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: How to create a large number of composites

Post by Dan Kreider »

Another question: when I try to create a composite, the glyphs don't stack... they are sequential from left to right. How do I make them superimposed?

Thanks!
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: How to create a large number of composites

Post by Erwin Denissen »

If your glyph names are literally @, 7, 5, and 3, then these should both work:

@_7_5_3.liga=@+7+5+3

at_seven_five_three.liga=@+7+5+3

However be aware the at sign is a special characters in feature code syntax, so it is best to not avoid it in your glyph names.
Dan Kreider wrote: Fri Apr 23, 2021 12:47 pm Another question: when I try to create a composite, the glyphs don't stack... they are sequential from left to right. How do I make them superimposed?
To make them stack, you need to provide cursive attachment anchors.
Erwin Denissen
High-Logic
Proven Font Technology
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: How to create a large number of composites

Post by Dan Kreider »

Well, I don't think (if I remember correctly) that I can use 7, 5, 3, etc in the actual .liga code. Those have to be written out in full. But the glyphs the ligature is referencing can be named anything.

Thanks, I will look into anchors again. That part is still confusing for me.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: How to create a large number of composites

Post by Erwin Denissen »

Dan Kreider wrote: Fri Apr 23, 2021 1:01 pm Well, I don't think (if I remember correctly) that I can use 7, 5, 3, etc in the actual .liga code. Those have to be written out in full.
Sure, by default the digit glyphs have names like one, two, etc, and you have to use those (or change the glyph name, but that is not recommended).
Erwin Denissen
High-Logic
Proven Font Technology
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: How to create a large number of composites

Post by Dan Kreider »

Sorry to be dense, but I can't figure it out. I combined superior 7, baseline 5, and subscript 3, and got this:

Image

But I want them to be stacked. I tried to add a cursive anchor, but I couldn't figure it out. Also, is this an OT feature? If so, the software this will be used with can only use standard ligatures. Thanks...
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: How to create a large number of composites

Post by Dan Kreider »

Ok, I added a bottom anchor (base) below the 7, and a top (mark) anchor above the 5, and got this:

Image

...which is progress, but I was expecting the 7 and the 5 would be lined up! What am I missing now? Thanks.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Erwin Denissen
Moderator
Moderator
Posts: 11108
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: How to create a large number of composites

Post by Erwin Denissen »

Sorry, but in my speedy reply I mixed up cursive with regular anchors. Even though it might also be possible with cursive (entry and exit) anchors, it is probably easiest to work with regular anchors. Your way of making glyphs is rather unusual, but this tutorial might help:
https://www.high-logic.com/font-editor/ ... ont-design

To make base to mark work, the second glyph should be a Mark glyph.
Erwin Denissen
High-Logic
Proven Font Technology
Dan Kreider
Posts: 92
Joined: Thu Mar 25, 2021 8:35 pm

Re: How to create a large number of composites

Post by Dan Kreider »

Just a quick note to say it's solved, thanks... I needed my anchors to be the same name: one base, one mark.
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Post Reply