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

* Re: font eatures with fallback fonts
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2008-08-01  9:04 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Khaled Hosny wrote:
> Font features doesn't seem to work with fallback fonts (or I didn't get
> it right).
> 
> See the attached file (has some comments)

keep in mind that this is still somewhat experimental and that i might 
add a bit more control over things

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

you need to keep in mind that the *featureset specification is notr 
always interpreted, so you need to specify the feature with the 
(symbolic) font name:

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

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

we might deal withthe following later but currently it is not supported

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

(one aspect of fallbacks is that each 'subfont' can have its own 
features so inheriting from the parent font is not a good idea)


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: font eatures with fallback fonts
  2008-08-01  9:04 ` Hans Hagen
@ 2008-08-01 11:25   ` Khaled Hosny
  0 siblings, 0 replies; 3+ messages in thread
From: Khaled Hosny @ 2008-08-01 11:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1256 bytes --]

On Fri, Aug 01, 2008 at 11:04:01AM +0200, Hans Hagen wrote:
> Khaled Hosny wrote:
> > Font features doesn't seem to work with fallback fonts (or I didn't get
> > it right).
> > 
> > See the attached file (has some comments)
> 
> keep in mind that this is still somewhat experimental and that i might 
> add a bit more control over things
I see.

> % This doesn't use the fallback featue, so is OK
> \definefont[ArabType][Arabtype*fea]
> 
> you need to keep in mind that the *featureset specification is notr 
> always interpreted, so you need to specify the feature with the 
> (symbolic) font name:
> 
> \definefontfallback [ara] [Arabtype*fea] [arabic] [force=yes]
> \definefontsynonym[Arabicserif][Serif][fallbacks=ara]

Aha, I should somehow expected that (given all the combinations I
tried).

> we might deal withthe following later but currently it is not supported
> 
> % This doesn't render Arabic too
> \definefont[ArabicFea][Arabicserif*fea]
> 
> (one aspect of fallbacks is that each 'subfont' can have its own 
> features so inheriting from the parent font is not a good idea)

Right, it might not be desired at all.

Thanks,
 Khaled

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

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