ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* font eatures with fallback fonts
@ 2008-07-31 23:36 Khaled Hosny
  2008-08-01  9:04 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Khaled Hosny @ 2008-07-31 23:36 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1.1: Type: text/plain, Size: 203 bytes --]

Font features doesn't seem to work with fallback fonts (or I didn't get
it right).

See the attached file (has some comments)

-- 
 Khaled Hosny
 Arabic localizer and member of Arabeyes.org team

[-- Attachment #1.1.2: fallback_font.tex --]
[-- Type: text/x-tex, Size: 2316 bytes --]

%%%%%%
\definefontfeature
   [fea]
   [mode=node,language=dflt,script=arab,
    init=yes,medi=yes,fina=yes,isol=yes,
    liga=yes,dlig=yes,rlig=yes,clig=yes,
    mark=yes,mkmk=yes,kern=yes,curs=yes]

\starttypescript [serif] [arabtype]
 \definefontsynonym [Arabtype-Light]       [name:ArabicTypesetting] [features=fea]
 \definefontsynonym [Arabtype-Bold]        [name:ArabicTypesetting] [features=fea]
 \definefontsynonym [Arabtype-Italic]      [name:ArabicTypesetting] [features=fea]
 \definefontsynonym [Arabtype-Bold-Italic] [name:ArabicTypesetting] [features=fea]
\stoptypescript

\starttypescript [serif] [arabtype]
 \usetypescript[serif][fallback]
 \definefontsynonym [Serif]                [Arabtype-Light]         [features=fea]
 \definefontsynonym [SerifItalic]          [Arabtype-Italic]        [features=fea]
 \definefontsynonym [SerifBold]            [Arabtype-Bold]          [features=fea]
 \definefontsynonym [SerifBoldItalic]      [Arabtype-Bold-Italic]   [features=fea]
\stoptypescript

\starttypescript [Arabtype]
  \definetypeface [Arabtype] [rm] [serif] [arabtype] [default] 
\stoptypescript 
%%%%%%

\usetypescript[Arabtype]
%\setupbodyfont[Arabtype,20pt]

\definefontfallback [ara] [Arabtype] [arabic] [force=yes]
\definefontsynonym[Arabicserif][Serif][fallbacks=ara]

% This doesn't render Arabic
%\definefontsynonym[Arabicserif][Serif][fallbacks=ara,features=fea]

% This doesn't use the fallback featue, so is OK
\definefont[ArabType][Arabtype*fea]

% This renders Arabic, but no OpenType features
\definefont[Arabic][Arabicserif]

% This doesn't render Arabic too
\definefont[ArabicFea][Arabicserif*fea]

\startbuffer[salah]
\textdir TRT\pardir TRT
اللَّهُمَّ صَلِّ عَلَى مُحَمَّدٍ وَآلِ مُحَمَّدٍ وَ ارْزُقْنِي الْيَقِينَ وَ حُسْنَ الظَّنِّ بِكَ
وَ أَثْبِتْ رَجَاءَكَ فِي قَلْبِي وَ اقْطَعْ رَجَائِي عَمَّنْ سِوَاكَ حَتَّى لَا أَرْجُوَ
 غَيْرَكَ وَ لَا أَثِقَ إِلَّا بِك

\textdir TLT\pardir TLT
\input knuth
\stopbuffer

\starttext
\ArabType\getbuffer[salah]
\hrule
\Arabic\getbuffer[salah]
\hrule
\ArabicFea\getbuffer[salah]
\stoptext

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

[-- Attachment #2: Type: text/plain, Size: 487 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-01 11:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-31 23:36 font eatures with fallback fonts Khaled Hosny
2008-08-01  9:04 ` Hans Hagen
2008-08-01 11:25   ` Khaled Hosny

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).