ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Font goodies color schemes by Unicode number
@ 2012-02-29 13:57 Khaled Hosny
  2012-02-29 15:57 ` Wolfgang Schuster
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Khaled Hosny @ 2012-02-29 13:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

Hi all,

Was exploring font goodies and color schemes and so far works great,
very nice feature, thanks Hans.

Now I've to small questions/feature requests:
Can color schemes be
defined using Unicode code points, e.g.: { 0x064E, 0x064F } instead of
glyph names (e.g. I'd like to have a font independent goody to color
Arabic combining marks and no glyph substitution is involved so Unicode
code points should work for most fonts).

Second question, can it be (ab)used to color a whole font with the same
color (can be handy sometimes), e.g. using a special wildcard or
something: { "*" }.

Regards,
 Khaled

[-- Attachment #2: amiri.tex --]
[-- Type: text/x-tex, Size: 518 bytes --]

\definefontfeature[arabic][arabic][goodies=amiri, colorscheme=default]

\definecolor[colorscheme:1:1][r=1]
\definecolor[colorscheme:1:2][g=1]
\definecolor[colorscheme:1:3][b=1]

\definecolor[colorscheme:2:1][c=.55]
\definecolor[colorscheme:2:2][m=.55]
\definecolor[colorscheme:2:3][y=.55]

\setupalign[r2l]

\starttext
\definedfont[name:amiri*arabic at 36pt]
\setfontcolorscheme[1]
ضَرَبَ ضُرِبَ ضَرْبًا

\setfontcolorscheme[2]
ضَرَبَ ضُرِبَ ضَرْبًا
\stoptext

[-- Attachment #3: amiri.lfg --]
[-- Type: text/plain, Size: 415 bytes --]

return {
    name = "Amiri",
    version = "1.00",
    comment = "Goodies that complement the Amiri font.",
    author = "Khaled Hosny",
    colorschemes = {
        default = {
            [1] = {
                "uni064E", "uni064B",
            },
            [2] = {
                "uni064F", "uni064C",
            },
            [3] = {
                "uni0650", "uni064D",
            },
        }
    }
}

[-- Attachment #4: 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] 6+ messages in thread

end of thread, other threads:[~2012-03-25 14:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-29 13:57 Font goodies color schemes by Unicode number Khaled Hosny
2012-02-29 15:57 ` Wolfgang Schuster
2012-02-29 16:33 ` Hans Hagen
2012-03-02 23:09 ` Hans Hagen
2012-03-24 20:23   ` Khaled Hosny
2012-03-25 14:44     ` Hans Hagen

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