* adjusting accents under slant
@ 2011-11-01 14:16 Idris Samawi Hamid ادريس سماوي حامد
2011-11-02 12:13 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2011-11-01 14:16 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Hans Hagen
[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]
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
[-- Attachment #2: accent.tex --]
[-- Type: application/x-tex, Size: 759 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adjusting accents under slant
2011-11-01 14:16 adjusting accents under slant Idris Samawi Hamid ادريس سماوي حامد
@ 2011-11-02 12:13 ` Hans Hagen
2011-11-03 1:56 ` Idris Samawi Hamid ادريس سماوي حامد
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2011-11-02 12:13 UTC (permalink / raw)
To: Idris Samawi Hamid ادريس
سماوي حامد
Cc: mailing list for ConTeXt users
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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adjusting accents under slant
2011-11-02 12:13 ` Hans Hagen
@ 2011-11-03 1:56 ` Idris Samawi Hamid ادريس سماوي حامد
0 siblings, 0 replies; 3+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2011-11-03 1:56 UTC (permalink / raw)
To: Hans Hagen; +Cc: mailing list for ConTeXt users
[-- Attachment #1: Type: text/plain, Size: 2351 bytes --]
On Wed, 02 Nov 2011 06:13:25 -0600, Hans Hagen <pragma@wxs.nl> wrote:
>> 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
[-- Attachment #2: accent.pdf --]
[-- Type: application/pdf, Size: 12649 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-11-03 1:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-01 14:16 adjusting accents under slant Idris Samawi Hamid ادريس سماوي حامد
2011-11-02 12:13 ` Hans Hagen
2011-11-03 1:56 ` Idris Samawi Hamid ادريس سماوي حامد
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).