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

* Re: Font goodies color schemes by Unicode number
  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
  2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Schuster @ 2012-02-29 15:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 29.02.2012 um 14:57 schrieb Khaled Hosny:

> 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: { "*" }.

To make a colored font I expect a key in \definefontfeature, e.g. \definefontfeature[red][color=red,…]

Wolfgang
___________________________________________________________________________________
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

* Re: Font goodies color schemes by Unicode number
  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
  2 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2012-02-29 16:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 29-2-2012 14:57, Khaled Hosny wrote:
> 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: { "*" }.

I'll give it a thought but first have to look into some reported 
problems with the beta

Hans


-----------------------------------------------------------------
                                           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] 6+ messages in thread

* Re: Font goodies color schemes by Unicode number
  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
  2 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2012-03-02 23:09 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 29-2-2012 14:57, Khaled Hosny wrote:
> 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: { "*" }.

the next beta supports "*" as well as ranges "0x0030:0x0035"

(I adapted demo.lfg and goodies-002.tex)

Hans


-----------------------------------------------------------------
                                           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] 6+ messages in thread

* Re: Font goodies color schemes by Unicode number
  2012-03-02 23:09 ` Hans Hagen
@ 2012-03-24 20:23   ` Khaled Hosny
  2012-03-25 14:44     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Khaled Hosny @ 2012-03-24 20:23 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

On Sat, Mar 03, 2012 at 12:09:11AM +0100, Hans Hagen wrote:
> On 29-2-2012 14:57, Khaled Hosny wrote:
> >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: { "*" }.
> 
> the next beta supports "*" as well as ranges "0x0030:0x0035"
> 
> (I adapted demo.lfg and goodies-002.tex)

Thanks Hans, it took me a while to get around testing it but I'm happy
to report that it works as expected :) I don't have a generic Arabic
file per se (but I'll right one someday), but the request was mainly
inspired by this question (though it is something I wanted to explore
for a while):
http://tex.stackexchange.com/a/46240/729

Regards,
 Khaled
___________________________________________________________________________________
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

* Re: Font goodies color schemes by Unicode number
  2012-03-24 20:23   ` Khaled Hosny
@ 2012-03-25 14:44     ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2012-03-25 14:44 UTC (permalink / raw)
  To: Khaled Hosny; +Cc: mailing list for ConTeXt users

On 24-3-2012 21:23, Khaled Hosny wrote:
> On Sat, Mar 03, 2012 at 12:09:11AM +0100, Hans Hagen wrote:
>> On 29-2-2012 14:57, Khaled Hosny wrote:
>>> 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: { "*" }.
>>
>> the next beta supports "*" as well as ranges "0x0030:0x0035"
>>
>> (I adapted demo.lfg and goodies-002.tex)
>
> Thanks Hans, it took me a while to get around testing it but I'm happy
> to report that it works as expected :) I don't have a generic Arabic
> file per se (but I'll right one someday), but the request was mainly
> inspired by this question (though it is something I wanted to explore
> for a while):
> http://tex.stackexchange.com/a/46240/729

A nice example (someone should copy it to the wiki as part of the font 
goodies section).

Hans


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