-
-
Save ezgranet/19d6f117f11e2d27c4572a2e3160389e to your computer and use it in GitHub Desktop.
| %%%%%%%% | |
| %%%%% Michael sharpe's brilliant typeface `etbb' is a | |
| %%% wonderful adaptation of Edward Tufte's own adaptation of Bembo | |
| %%%%%% However, there is, as part of the font, an overlap between | |
| %%% the opening parenthesis --- ( --- and various letters, most notably J | |
| %% This is aesthetically displeasing, so I used this small snippet | |
| %%%% of XeTeX `interchartoks' to fix the spacing | |
| %%%% Now, (J doesn't overlap! | |
| \XeTeXinterchartokenstate = 1 | |
| \newXeTeXintercharclass \mycharclassj | |
| \XeTeXcharclass `\J \mycharclassj | |
| \newXeTeXintercharclass \mycharclasslittlej | |
| \XeTeXcharclass `\j \mycharclasslittlej | |
| \newXeTeXintercharclass \mycharclasst | |
| \newXeTeXintercharclass \mycharclassu | |
| \newXeTeXintercharclass \mycharclassv | |
| \XeTeXcharclass `\T \mycharclasst | |
| \XeTeXcharclass `\U \mycharclassu | |
| \XeTeXcharclass `\V \mycharclassv | |
| \newXeTeXintercharclass \mycharclassp | |
| \XeTeXcharclass `( \mycharclassp | |
| \XeTeXinterchartoks\mycharclassp\mycharclassj={\kern1.5pt } | |
| \XeTeXinterchartoks\mycharclassp\mycharclasslittlej={\kern1.5pt } | |
| \XeTeXinterchartoks\mycharclassp\mycharclasst={\kern0.7pt } | |
| \XeTeXinterchartoks\mycharclassp\mycharclassu={\kern0.7pt } | |
| \XeTeXinterchartoks\mycharclassp\mycharclassv={\kern0.7pt } | |
Great point on the (J. My view is that, given since the time of writing this Gist, it has been announced that XeLaTeX is going into maintenance mode, and the future is LuaLaTeX, that the approach here with interchartoks should be abandoned in favour of either writing a Lua filter (chain substitution to add space) OR simply modifying the font to fix this. As switching to a Lua only solution would disadvantage XeTeX legacy users and still leave pdfLaTeX users out, I think the latter option is best. My suggestion is that we make a list of every problematic pair in the most recent ETbb release and then as a courtesy first get in touch with Professor Sharpe to discuss adding these to the main CTAN release. (I have written him with suggestions in the past and he has been unfailingly polite and responsive) If he is uninterested, happily we can just fork the typeface with the updated font kerning.
Sounds great. I will pay attention to problematic pairs. XeTex is my main tex engine, but I do use LuaTex occasionally. I will keep you posted if I come up with some fixes using Lua filter.
Most definitely; I think this is why the endpoint is to modify the kerning itself, so as to maintain maximum compatibility (I mainly use LuaTeX but I have so many older documents using specific XeTeX hacks that cross compatibility is important to me too)
These are nice adjustments! But (J still overlaps for in-text citations. Any suggestions?