Discussion:
[fontforge-users] Multi-mark glyphs: do I really need to copy all anchors to all composite glyphs?
Nikolaus Waxweiler
2015-12-19 13:26:58 UTC
Permalink
Hey list,
So I'm going for almost Adobe Latin 4 coverage and that requires glyphs
with multiple marks. I use Ctrl+Shift+A for that. E.g. U+1E5C is
composed by attaching a macron to U+1E5A, which doesn't take my "above"
anchor for the base glyph R into account, meaning I have to manually add
it to U+1E5C and U+1E5D. Ugh. Is there a way to tell FF to take *all*
anchors of the base glyph into account?

Regards,
Nikolaus

------------------------------------------------------------------------------
marty39
2016-01-02 01:33:11 UTC
Permalink
I consider myself a newbie here but I think this should have been answered by
now so I'll throw in my 2¢ worth: isn't this supposed to be the place for
mark-to-mark anchors? You don't put a base anchor on every composite glyph
that could possibly take another mark; you put a base (mark-to-mark) anchor
on every mark that could take a mark on top of it, and a mark (mark-to-mark)
anchor on every mark that could go on top of another. Somebody please
correct me if that's wrong.



--
View this message in context: http://fontforge.10959.n7.nabble.com/Multi-mark-glyphs-do-I-really-need-to-copy-all-anchors-to-all-composite-glyphs-tp14952p14953.html
Sent from the User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Nikolaus Waxweiler
2016-01-02 11:05:21 UTC
Permalink
I'm using mark-to-mark already, but for stacking diacritics. The problem
is something else: take U+1E5D for example. It's basically U+1E5B plus
U+0304, so FontForge's "build accented" function builds it with a
reference of U+1E5B with a U+0304 attached. U+0304 has a mark-to-base
anchor "above", so does 'r' the base glyph. When composing U+1E5B
though, the base for U+1E5D, no anchors from the base glyph 'r' are
copied or otherwise referenced. And so, when I want to build U+1E5D,
U+0304 has no anchor to attach to on U+1E5B and I'm left copying the
"above" anchor from 'r' to U+1E5B. I have to do that for every
multi-mark glyph, regardless of base-to-mark or mark-to-mark.

------------------------------------------------------------------------------
marty39
2016-01-02 13:24:17 UTC
Permalink
I can think of two ways Fontforge could be improved to avoid the need for
manually copying anchors:

1. Copy all anchors from the component glyphs to composite glyphs when
building accented glyphs. One difficulty there is that composite glyphs
consist of references, meaning that changes in the original glyphs are
passed on to the components. That should include changes in the anchors, so
Fontforge would have to define a new object: reference to an anchor. A mere
copy of an anchor wouldn't work; it wouldn't change when the original glyph
is changed.

2. Don't use shortcuts when building accented glyphs. An 'r' with dot below
and macron above is built by adding a macron above to 'r' with dot below. It
could also have been built by adding a dot below to 'r' with macron above.
But if it's built by adding a dot below and a macron above to 'r', all the
original anchors are available to be used. The difficulty here is writing
new rules for building every composite glyph that has marks both above and
below.

Method 1 goes into some of the basic object definitions in Fontforge and
opens up possibilities for new bugs. Method 2, as far as I can imagine it,
would be tedious, and would open up possibilities for errors, but not bugs.



--
View this message in context: http://fontforge.10959.n7.nabble.com/Multi-mark-glyphs-do-I-really-need-to-copy-all-anchors-to-all-composite-glyphs-tp14952p14957.html
Sent from the User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Nikolaus Waxweiler
2016-01-03 22:31:51 UTC
Permalink
Hm, I think it would be easier for the build function to recursively
search the base reference until an anchor is found. That way, all base
glyph anchors are honored and if the designer chooses to place an anchor
differently on a composite glyph, the search stops at that glyph.

------------------------------------------------------------------------------
marty39
2016-01-04 15:00:12 UTC
Permalink
I just realized we have to think not only about how fontforge builds
precomposed glyphs but also about text layout applications building accented
glyphs from components. Fontforge developers can change the build function
on fontforge but can't change it on other applications. If applications
build complex composite glyphs from simpler composite glyphs, then all
composite glyphs should have anchors.

References to anchors would be good. In fact we could use references to
anchors even now. But we don't have references to anchors. Copies of anchors
would help even if it's not the perfect solution.

The easiest solution might be to have an option to build composite glyphs
from copies of the component glyphs instead of references (since a copy of a
glyph includes the anchors).



--
View this message in context: http://fontforge.10959.n7.nabble.com/Multi-mark-glyphs-do-I-really-need-to-copy-all-anchors-to-all-composite-glyphs-tp14952p14961.html
Sent from the User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Georg Duffner
2016-01-04 23:44:43 UTC
Permalink
Hey Nikolaus,

for the composition of multi-diacritic glyphs I use a python script
(https://github.com/georgd/EB-Garamond/blob/master/tools/glyphbuilder.py),
which adds an entry in the tools menu of FF. I haven’t used it for ages
so I don’t know if it still works with FF. You need a file called
glyphcomponents.py that contains a dictionary for all the glyph
components
(https://github.com/georgd/EB-Garamond/blob/master/tools/glyphcomponents.py).

Best regards,
Georg
Post by Nikolaus Waxweiler
Hey list,
So I'm going for almost Adobe Latin 4 coverage and that requires glyphs
with multiple marks. I use Ctrl+Shift+A for that. E.g. U+1E5C is
composed by attaching a macron to U+1E5A, which doesn't take my "above"
anchor for the base glyph R into account, meaning I have to manually add
it to U+1E5C and U+1E5D. Ugh. Is there a way to tell FF to take *all*
anchors of the base glyph into account?
Regards,
Nikolaus
------------------------------------------------------------------------------
_______________________________________________
fontforge-users mailing list
https://lists.sourceforge.net/lists/listinfo/fontforge-users
http://fontforge.10959.n7.nabble.com/User-f8781.html
--
EB Garamond: http://www.georgduffner.at/ebgaramond

------------------------------------------------------------------------------
Nikolaus Waxweiler
2016-01-05 06:57:07 UTC
Permalink
Hey Georg,
thanks :) I'll keep it in mind if I ever work on another typeface.

Best regards,
Nikolaus

------------------------------------------------------------------------------
marty39
2016-02-23 09:59:35 UTC
Permalink
After all this discussion, I ran into a similar situation when I expanded the
Greek coverage of a font to polytonic Greek. Looking at the results of the
massive build, I realized that many of the composites were not what I
wanted. I went back and more or less selectively copied marks from base
glyphs to the intermediate composites that needed them. The task was tedious
but finite.



--
View this message in context: http://fontforge.10959.n7.nabble.com/Multi-mark-glyphs-do-I-really-need-to-copy-all-anchors-to-all-composite-glyphs-tp14952p14980.html
Sent from the User mailing list archive at Nabble.com.
Nikolaus Waxweiler
2016-02-23 16:37:22 UTC
Permalink
Post by marty39
I went back and more or less selectively copied marks from base
glyphs to the intermediate composites that needed them. The task was
tedious but finite.
See, that's what I, as a professional lazy person, don't like ;)
Nikolaus Waxweiler
2016-02-23 16:40:08 UTC
Permalink
Oh, and before I forget: Don't copy `mkmk` anchors to base glyphs when
building multi-mark glyphs. If the glyph class is set to automatic,
FontForge will mistake the glyph for a mark and it will be rendered with
zero-width by libharfbuzz 1.2.0. Use normal `mark` anchors instead.
Loading...