Fonts & Character SetsKerning and alternate glyphs with Minion Pro

Information and discussion about fonts and character sets (e.g. how to use language specific characters)
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Kerning and alternate glyphs with Minion Pro

Post by AleCes »

I'm using a localized form (specifically, Serbian) of U+0431 "CYRILLIC SMALL LETTER BE". I think Latex does not kern it the right way, behaving as if it was adjusting space to the standard version rather than to the localized one. :|
Gonna make you understand this lofty issue through a very simple visual sample: in the attached .pdf you'll find just two lines with each two letters! OK? :mrgreen: Now, the first one, the capital (U+0423 "CYRILLIC CAPITAL LETTER U") doesn't concern us much, I put it in here just because it displays what a blatant example of bad kerning. :evil:
Are you following me :?: All right :!: So let's concentrate on the second letter: you'll have noticed that while the first letter appears identical on both lines, the second looks different! But it still bears the same Unicode code & name U+0431 "CYRILLIC SMALL LETTER BE", that's because the first is the localized Serbian glyph, the second is the standard (Russian) glyph.
The bottom line of all this complicated talk, it's that since kerning is all right in the second line (with standard-Russian glyph), while patently wrong in the first (with the localized-Serbian glyph), I got the impression that Latex persists on kerning "having in mind" the standard-russian form rather than the localized-serbian one.
Hope I didn't scare you guys with such a long subject. :o And thank you all in advance! 8-)
Attachments
Glyphes serbes & russes.pdf
Serbian & Russian glyphs
(2.56 KiB) Downloaded 465 times
Last edited by AleCes on Sun Nov 28, 2010 10:06 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Kerning and alternate glyphs with Minion Pro

Post by AleCes »

OK, OK, you'll have to excuse me. I realized the problem was inherent in the font I used, that freaky MinionPro that turns out once more to be as beautiful as buggy. :evil:
With, say, Constantia, no kerning problems! :oops:
Now, is there a way to put something in the prologue that adds automatically some kind of corrective space when the two aforementioned glyphs join up? :P
Attachments
Glyphes serbes & russes.pdf
With Constantia no kerning problems!
(6.57 KiB) Downloaded 461 times
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Kerning and alternate glyphs with Minion Pro

Post by AleCes »

I think the issue got much easier than it seemed when i started the topic, I just need to write something in the prologue that will automatically insert something like an italic correction (preferably smaller) whenever the infamous combination shall occur. Nobody knows how to do it? 8-)
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Kerning and alternate glyphs with Minion Pro

Post by AleCes »

OK, what if I provide you with the .tex source so that you may compile it and tell me whether you get the same problem?
Remember: compile in XeLaTex with MinionPro font installed.
Attachments
Glyphes serbes & russes.tex
Serbian & Russian Glyphs (source file)
(581 Bytes) Downloaded 324 times
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Kerning and alternate glyphs with Minion Pro

Post by AleCes »

My God, nobody even downloaded the file! :lol: Anyhow, the matter was solved on the Typophile forum, see the thread: http://typophile.com/node/76725. Basically, it's a question of version, mine, the 2004 does have such kerning problems, while the newer (2010) fixes it, but it's for-fee! Goddamit Adobe! :mrgreen:
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Kerning and alternate glyphs with Minion Pro

Post by meho_r »

Seems to me that polyglossia+serbian is the cause of problem, not Minion Pro font itself. Test it without polyglossia and you'll find that kerning is OK. It's OK in Scribus too. All that said, you may consider asking about this issue on XeTeX mailing list (or even submit a bug report against polyglossia).

Code: Select all

\documentclass{article}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Minion Pro}
\usepackage{polyglossia}
\setmainlanguage{french}
%\setotherlanguage{russian} 
%\setotherlanguage{serbian}
\usepackage{xunicode}
\usepackage{xltxtra}

\begin{document}
\section{Serbe}
\fontsize{12}{12}\selectfont Deuxième lettre affichant le glyphe localisé serbe: \fontsize{24}{24}\selectfont {Уб}
\section{Russe}
\fontsize{12}{12}\selectfont Deuxième lettre affichant le glyphe standard russe: \fontsize{24}{24}\selectfont Уб
\end{document}
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Kerning and alternate glyphs with Minion Pro

Post by AleCes »

Hy meho_r! If you bypass Polyglossia, you'll simply have no way to access the locl table appropriate for Serbian, then you'll get no kerning flaw because the combination with the standard glyph doesn't show such flaw. Polyglossia, besides providing hyphenation, which is not relevant in this case, manages OpenType features appropriate for the selected language.
Even by skipping Polyglossia, the flaw reappears, which means the problem is not generated by any package but rather inherent in the flawed font design. Try .tex file and let me know if you get the same kerning problem with the Serbian glyph (second line). I did.
Note: this time the locl table is accessed through

Code: Select all

\addfontfeatures{Language=Serbian, Script=Cyrillic}
Attachments
Glyphes serbes & russes.tex
Without Polyglossia
(306 Bytes) Downloaded 282 times
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Re: Kerning and alternate glyphs with Minion Pro

Post by meho_r »

OK, in that case the best way (until you get a newer version of Minion Pro font) might be to modify kerning between capital letter "У" and alternate "б" manually, in the font file. I tried doing that with fontforge, it's not a big deal (in case you haven't worked with fontforge before: open the font > select "У" > Metrics > Kern Pair Closeup, then change the kern offset; File > Generate fonts > OpenType).
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Kerning and alternate glyphs with Minion Pro

Post by AleCes »

Thank you meho_r, for getting me out of trouble once again. Problem is that the question does not concern just me. At the Serbian Wikipedia there was some talk of adopting MinionPro as standard serified font because of its support of Serbian glyphs. But such gross flaw in a rather frequent combination of letters (as far as Serbian is concerned) spoils an otherwise wonderful font. And asking users to manually fiddle with FontForge is definitely the solution that we're looking for.
Thank you anyway.
AleCes
Posts: 286
Joined: Sat Nov 13, 2010 9:54 pm

Kerning and alternate glyphs with Minion Pro

Post by AleCes »

Sorry to reopen the topic, but when I tried to correct the kerning error in FontForge I discovered it (the font) already had the pair in question well arranged in the kerning table. So the designer had already anticipated such combination. Does that mean that as, I suspected at the beginning, that the problem lies more with the way XeLaTex handles kerning? Maybe it simply ignores kerning as far as localized/alternate glyphs are concerned and treats them as if they were not so, causing thus overlapping. We should find another program which supports OpenType features and test the font with it.
Post Reply