adjusting accents under slant
Dear Hans and gang, I got this working in mkii -- using other macros --, but mkiv is frustrating me: ====================== %% Hans' bottom accent code \unprotect \unexpanded\def\bottomaccent#1#2#3#4#5% down right slantcorrection accent char {\dontleavehmode % why this align mess \vtop {\forgetall \baselineskip\zeropoint \lineskip#1% \everycr\emptytoks \tabskip\zeropoint \lineskiplimit\zeropoint \setbox0\hbox{#4}% \halign {##\crcr\hbox{#5}\crcr \hidewidth \hskip#2\wd0 \hskip-#3\slantperpoint % in plain 1ex * dimenless value \vbox to .2ex{\box0\vss}\hidewidth \crcr}}} \unexpanded\def\buildtextbottomdot {\bottomaccent{0ex}{4}{5}{\kern.1em\textbottomdot}} \let\d\buildtextbottomdot \protect \defineactivecharacter ḥ {\d{h}} \starttext ḥ {\it ḥ} \stoptext ====================== I need to adjust the horizontal position of the dot under the slanted char. I would assume the third parameter would control it but nothing seems to work. Of course LM does not look so bad but I'm using a different font so this is just an illustration. Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
On 1-11-2011 15:16, Idris Samawi Hamid ادريس سماوي حامد wrote:
Dear Hans and gang,
I got this working in mkii -- using other macros --, but mkiv is frustrating me:
====================== %% Hans' bottom accent code \unprotect \unexpanded\def\bottomaccent#1#2#3#4#5% down right slantcorrection accent char {\dontleavehmode % why this align mess \vtop {\forgetall \baselineskip\zeropoint \lineskip#1% \everycr\emptytoks \tabskip\zeropoint \lineskiplimit\zeropoint \setbox0\hbox{#4}% \halign {##\crcr\hbox{#5}\crcr \hidewidth \hskip#2\wd0 \hskip-#3\slantperpoint % in plain 1ex * dimenless value \vbox to .2ex{\box0\vss}\hidewidth \crcr}}}
\unexpanded\def\buildtextbottomdot {\bottomaccent{0ex}{4}{5}{\kern.1em\textbottomdot}} \let\d\buildtextbottomdot \protect
\defineactivecharacter ḥ {\d{h}}
\starttext ḥ {\it ḥ} \stoptext ======================
I need to adjust the horizontal position of the dot under the slanted char. I would assume the third parameter would control it but nothing seems to work.
Of course LM does not look so bad but I'm using a different font so this is just an illustration.
\slantperpoint is a rather traditional tex/font parameter and not present in opentype fonts so you have to hard code something there you could try \definefontfeature[default][default][compose=yes] assuming that you have the bottom accent available -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Wed, 02 Nov 2011 06:13:25 -0600, Hans Hagen
Of course LM does not look so bad but I'm using a different font so this is just an illustration.
\slantperpoint
is a rather traditional tex/font parameter and not present in opentype fonts so you have to hard code something there
Sure ... but I can't figure out a way to change the italic behavior without changing the tf behavior. Do you have a trick somewhere where you can define a conditional such that if slanted font (\it or \sl etc) do x else do y Then we could add that to the macro? Is there any other way?
you could try \definefontfeature[default][default][compose=yes] assuming that you have the bottom accent available
I already have compose=yes in the typscripts, e.g. ================= \definefontfallback [latindot] [file:LMRoman12-Regular*default] [0x0323] [force=yes] \definefontfeature [minionpro-tf] [mode=node,script=latn,language=dflt,trep=yes,protrusion=quality, expansion=quality,compose=yes,combine=yes,tlig=yes, kern=yes,liga=yes,onum=yes,cpsp=yes] \definefontfeature [minionpro-it] [mode=node,script=latn,language=dflt,trep=yes,compose=yes,combine=yes,tlig=yes, kern=yes,liga=yes,onum=yes,cpsp=yes,protrusion=quality,expansion=quality, swsh=yes] ================= but the results are bad using ================= \defineactivecharacter ḥ {ḥ} % Ux0323 is explicit within the {} \defineactivecharacter Ḥ {Ḥ} % Ux0323 is explicit within the {} \defineactivecharacter ṣ {ṣ} % Ux0323 is explicit within the {} \defineactivecharacter Ṣ {Ṣ} % Ux0323 is explicit within the {} \starttext Ḥ {\it Ḥ} ḥ {\it ḥ} Ṣ {\it Ṣ} ṣ {\it ṣ} \stoptext ================= See pdf. Even in LM, the results are very uneven ... If it takes a hard-coded solution for each char that's fine, I should be able to extrapolate from a template for just one in regular and italic. I've experimented with different ideas, but I'm really out of my league on this one ... please help! :-) Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523
participants (2)
-
Hans Hagen
-
Idris Samawi Hamid ادريس سماوي حامد