Page 1 of 1

Space Diacritics?

Posted: Sun Sep 17, 2017 11:19 am
by Karin1610
I've come quite far spacing my font now, but I don't quite know what to do with the diacritic marks. They are used in the composites and placed correctly above the letters, but I don't guess they'll ever be used on their own. So do I even have to space characters like grave, acute, dieresis .... at all?
And if so, are there any rules about how to do this right?

Thanks for any advice!

Re: Space Diacritics?

Posted: Sun Sep 17, 2017 11:37 am
by Bhikkhu Pesala
It does not matter as they are not often used alone. Just give them a side-bearing of 50 funits of whatever.

Re: Space Diacritics?

Posted: Sun Sep 17, 2017 11:41 am
by Erwin Denissen
The marks category contains all known marks. Several are non-spacing combining marks which should have a zero advance width. You can hover over the glyphs to see a hints about this:
marks.png
marks.png (44.36 KiB) Viewed 1605 times

Re: Space Diacritics?

Posted: Sun Sep 17, 2017 11:43 am
by Karin1610
Great, thank you both!

Re: Space Diacritics?

Posted: Sun Sep 17, 2017 3:07 pm
by PJMiller
The diacritics are meant to be placed above the preceeding character so the placement should be such that it is in the correct position above a lower case letter preceeding it.

Of course lower case letters are all different sizes and different heights and what if it is preceeded by an upper case character, so you can only get it approximately correct.

That is where anchors come in.

There are two types of anchor, base and mark.

When you add an anchor to a base glyph it should be a 'base' type anchor, when you add an anchor to a diacritic mark it should be a 'mark' type anchor.

Then if that diacritic mark character is used following the character which has an anchor of the same name the rendering program will line up the two anchors so that they are in the same position, it does this by moving the character with the 'mark' type anchor, the character with the 'base' anchor does not have it's position altered.

Two consecutive glyphs with 'base' anchors of the same name will have no effect, their positions will not be altered. Two consecutive characters with 'mark' type anchors of the same name will have no effect and their positions will not be altered.

It is also possible to add mark and base type anchors to combining diacritics so that they can stack on top of one another.

In this way it is possible to get the diacritic marks to always position themselves in just the right position for each different character.

Re: Space Diacritics?

Posted: Wed Sep 20, 2017 6:08 pm
by Karin1610
@PJMiller - This is not exactly what I was as asking about, but it's very interesting. I didn't bother finding out about anchors yet because I didn't think I'd need that feature. I used "Complete Composite" to create my characters with diacritic marks and it worked really well. So what I don't quite understand is what to use the anchors for when I have my characters with diacritics already built.

Re: Space Diacritics?

Posted: Wed Sep 20, 2017 9:31 pm
by PJMiller
The combining diacritics have zero advance width and are placed after the character they are meant to accent. Without anchors they are in a fixed position which is correct for some characters but not for others, with anchors they can be made to move to the correct position for any character.

Re: Space Diacritics?

Posted: Thu Sep 21, 2017 4:00 pm
by Karin1610
I'm sorry, I guess I still don't get the sense of it.
Does this mean using anchors is an alternative for manually creating all the characters with diacritic marks?

Re: Space Diacritics?

Posted: Thu Sep 21, 2017 5:37 pm
by PJMiller
It would be better to have the accented characters and the combining diacritics. But just having the accented characters will be OK.

If you have the combining diacritics as well the user can accent characters which have no accented character in Unicode, for instance in my wifes language they use a lower and upper case 'g' with a tilde which isn't in the Unicode standard but if the font has combining diacritics then that isn't a problem you just put the combining tilde after the g and it places itself above the g.

Re: Space Diacritics?

Posted: Fri Sep 22, 2017 4:20 pm
by Karin1610
Ah, now I understand! It definitely makes sense for a font that's supposed to be used in all kinds of languages. I just tried that g with the tilde with Arial and it's really misplaced.

Thanks for your patiences, I've learned something new now!