ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Alphabet & color
@ 2020-07-16  5:32 Marcus Vinicius Mesquita
  2020-07-16  7:19 ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus Vinicius Mesquita @ 2020-07-16  5:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

Dear list

I need to typeset a book for kids wich contains texts where each letter is
assigned a fixed color, for example:

A - - > red;
B - - > blue;
...
Z - - > green.

What would be the best way to do this? TIA.

Marcus Vinicius

[-- Attachment #1.2: Type: text/html, Size: 517 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-16  5:32 Alphabet & color Marcus Vinicius Mesquita
@ 2020-07-16  7:19 ` Hans Hagen
  2020-07-16 16:41   ` Marcus Vinicius Mesquita
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2020-07-16  7:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Marcus Vinicius Mesquita

On 7/16/2020 7:32 AM, Marcus Vinicius Mesquita wrote:
> Dear list
> 
> I need to typeset a book for kids wich contains texts where each letter 
> is assigned a fixed color, for example:
> 
> A - - > red;
> B - - > blue;
> ...
> Z - - > green.
> 
> What would be the best way to do this? TIA.
There's more ways to do this but here is one:

(1) make a file: colorfont.lfg:

return {
     name = "coloralphabet",
     colorschemes = {
         default = {
             [1] = { "a", "e" },
             [2] = { "i", "o", "u" },
         },
         whatever = {
             [1] = { "65:90" },
             [2] = { },
             [3] = { },
             [4] = { "97:122" },
         }
     }
}

There is some more possible but this wil do ...

(2) You define a font with these goodies attached:

\setupbodyfont[plex,10pt]

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default,liga=no]

\definefontfeature
   [MyFeaturesB] [default]
   [goodies={colorfont},colorscheme=whatever,liga=no]

\definefont[MyFontA][Serif*MyFeaturesA]
\definefont[MyFontB][Serif*MyFeaturesB]

(3) and use it this way:

\starttext

\setfontcolorscheme[1] {\MyFontA \samplefile{tufte}}\par
\setfontcolorscheme[2] {\MyFontA \samplefile{tufte}}\par
\setfontcolorscheme[3] {\MyFontA \samplefile{tufte}}\par

\page

\setfontcolorscheme[1] {\MyFontB \samplefile{tufte}}\par
\setfontcolorscheme[2] {\MyFontB \samplefile{tufte}}\par
\setfontcolorscheme[3] {\MyFontB \samplefile{tufte}}\par

\stoptext

Now, this is pretty (more than a decade) old functionality from early 
days of mkiv/luatex when it was used for some tracing (by Idris) and it 
still works (surprise).

Today I would definitely use more recent trickery. If there is real 
demand for this I can have a look at it, after all it's "kind of fun" 
(as is most of font stuff).

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-16  7:19 ` Hans Hagen
@ 2020-07-16 16:41   ` Marcus Vinicius Mesquita
  2020-07-16 16:57     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus Vinicius Mesquita @ 2020-07-16 16:41 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


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

Thank you, Hans for your answer.

I tried your code and it works fine. But where do the color schemes default
and whatever come from? How can they be changed?

Best regards

Marcus Vinicius

On Thu, Jul 16, 2020, 04:19 Hans Hagen <j.hagen@xs4all.nl> wrote:

> On 7/16/2020 7:32 AM, Marcus Vinicius Mesquita wrote:
> > Dear list
> >
> > I need to typeset a book for kids wich contains texts where each letter
> > is assigned a fixed color, for example:
> >
> > A - - > red;
> > B - - > blue;
> > ...
> > Z - - > green.
> >
> > What would be the best way to do this? TIA.
> There's more ways to do this but here is one:
>
> (1) make a file: colorfont.lfg:
>
> return {
>      name = "coloralphabet",
>      colorschemes = {
>          default = {
>              [1] = { "a", "e" },
>              [2] = { "i", "o", "u" },
>          },
>          whatever = {
>              [1] = { "65:90" },
>              [2] = { },
>              [3] = { },
>              [4] = { "97:122" },
>          }
>      }
> }
>
> There is some more possible but this wil do ...
>
> (2) You define a font with these goodies attached:
>
> \setupbodyfont[plex,10pt]
>
> \definefontfeature
>    [MyFeaturesA] [default]
>    [goodies={colorfont},colorscheme=default,liga=no]
>
> \definefontfeature
>    [MyFeaturesB] [default]
>    [goodies={colorfont},colorscheme=whatever,liga=no]
>
> \definefont[MyFontA][Serif*MyFeaturesA]
> \definefont[MyFontB][Serif*MyFeaturesB]
>
> (3) and use it this way:
>
> \starttext
>
> \setfontcolorscheme[1] {\MyFontA \samplefile{tufte}}\par
> \setfontcolorscheme[2] {\MyFontA \samplefile{tufte}}\par
> \setfontcolorscheme[3] {\MyFontA \samplefile{tufte}}\par
>
> \page
>
> \setfontcolorscheme[1] {\MyFontB \samplefile{tufte}}\par
> \setfontcolorscheme[2] {\MyFontB \samplefile{tufte}}\par
> \setfontcolorscheme[3] {\MyFontB \samplefile{tufte}}\par
>
> \stoptext
>
> Now, this is pretty (more than a decade) old functionality from early
> days of mkiv/luatex when it was used for some tracing (by Idris) and it
> still works (surprise).
>
> Today I would definitely use more recent trickery. If there is real
> demand for this I can have a look at it, after all it's "kind of fun"
> (as is most of font stuff).
>
> Hans
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>

[-- Attachment #1.2: Type: text/html, Size: 3675 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-16 16:41   ` Marcus Vinicius Mesquita
@ 2020-07-16 16:57     ` Hans Hagen
  2020-07-16 22:02       ` Marcus Vinicius Mesquita
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2020-07-16 16:57 UTC (permalink / raw)
  To: Marcus Vinicius Mesquita; +Cc: mailing list for ConTeXt users

On 7/16/2020 6:41 PM, Marcus Vinicius Mesquita wrote

> I tried your code and it works fine. But where do the color schemes 
> default and whatever come from? How can they be changed?
defauls is defined in the example .. colorshemes have numbers:

\definecolor[colorscheme:1:1][s=.75]
\definecolor[colorscheme:1:2][r=.75]
\definecolor[colorscheme:1:3][g=.75]
\definecolor[colorscheme:1:4][b=.75]
\definecolor[colorscheme:1:5][c=.75]
\definecolor[colorscheme:1:6][m=.75]
\definecolor[colorscheme:1:7][y=.75]

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-16 16:57     ` Hans Hagen
@ 2020-07-16 22:02       ` Marcus Vinicius Mesquita
  2020-07-31 15:06         ` Marcus Vinicius Mesquita
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus Vinicius Mesquita @ 2020-07-16 22:02 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


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

I got it. Thanks.

Marcus Vinicius

On Thu, Jul 16, 2020, 13:57 Hans Hagen <j.hagen@xs4all.nl> wrote:

> On 7/16/2020 6:41 PM, Marcus Vinicius Mesquita wrote
>
> > I tried your code and it works fine. But where do the color schemes
> > default and whatever come from? How can they be changed?
> defauls is defined in the example .. colorshemes have numbers:
>
> \definecolor[colorscheme:1:1][s=.75]
> \definecolor[colorscheme:1:2][r=.75]
> \definecolor[colorscheme:1:3][g=.75]
> \definecolor[colorscheme:1:4][b=.75]
> \definecolor[colorscheme:1:5][c=.75]
> \definecolor[colorscheme:1:6][m=.75]
> \definecolor[colorscheme:1:7][y=.75]
>
> Hans
>
>
> -----------------------------------------------------------------
>                                            Hans Hagen | PRAGMA ADE
>                Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>         tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
>

[-- Attachment #1.2: Type: text/html, Size: 1574 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-16 22:02       ` Marcus Vinicius Mesquita
@ 2020-07-31 15:06         ` Marcus Vinicius Mesquita
  2020-07-31 16:31           ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus Vinicius Mesquita @ 2020-07-31 15:06 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


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

Hi, again

With the suggestions you gave I managed to obtain the functionality I need,
almost.
Somehow letters with accents like á ã é ó õ and also ç don't get the same
color of the base letters given in the colorfont.lfg below:

return {
     name = "coloralphabet",
     colorschemes = {
         default = {
         [1] = { "A", "a", "á", "ã", "å", "à", "ä" },
         [2] = { "b", "B" },
         [3] = { "c", "ç", "C", "Ç" },
         [4] = { "d", "D" },
         [5] = { "e", "E" },
         [6] = { "f", "F" },
         [7] = { "g", "G" },
         [8] = { "h", "H" },
         [9] = { "i", "í", "ì", "I", "Í", "Ì" },
         [10] = { "j", "J" },
         [11] = { "k", "K" },
         [12] = { "l", "L" },
         [13] = { "m", "M" },
         [14] = { "n", "ñ", "N", "Ñ" },
         [15] = { "o", "ó", "õ", "ö", "O", "Ó", "Õ", "Ö"  },
         [16] = { "p", "P" },
         [17] = { "q", "Q" },
         [18] = { "r", "R" },
         [19] = { "s", "S" },
         [20] = { "t", "T" },
         [21] = { "u", "ù", "ú", "ü", "U", "Ù", "Ú", "Ü" },
         [22] = { "v", "V" },
         [23] = { "w", "W" },
         [24] = { "x", "X" },
         [25] = { "y", "Y" },
         [26] = { "z", "Z" },
         },
     }
}

The MWE follows below:

\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}

\stoptext

What needs to be changed?

Greetings

Marcus Vinicius

[-- Attachment #1.2: Type: text/html, Size: 4017 bytes --]

[-- Attachment #2: colorfont.lfg --]
[-- Type: application/octet-stream, Size: 1024 bytes --]

return {
     name = "coloralphabet",
     colorschemes = {
         default = {
         [1] = { "A", "a", "á", "ã", "å", "à", "ä" },
         [2] = { "b", "B" },
         [3] = { "c", "ç", "C", "Ç" },
         [4] = { "d", "D" },
         [5] = { "e", "E" },
         [6] = { "f", "F" },
         [7] = { "g", "G" },
         [8] = { "h", "H" },
         [9] = { "i", "í", "ì", "I", "Í", "Ì" },
         [10] = { "j", "J" },
         [11] = { "k", "K" },
         [12] = { "l", "L" },
         [13] = { "m", "M" },
         [14] = { "n", "ñ", "N", "Ñ" },
         [15] = { "o", "ó", "õ", "ö", "O", "Ó", "Õ", "Ö"  },
         [16] = { "p", "P" },
         [17] = { "q", "Q" },
         [18] = { "r", "R" },
         [19] = { "s", "S" },
         [20] = { "t", "T" },
         [21] = { "u", "ù", "ú", "ü", "U", "Ù", "Ú", "Ü" },
         [22] = { "v", "V" },
         [23] = { "w", "W" },
         [24] = { "x", "X" },
         [25] = { "y", "Y" },
         [26] = { "z", "Z" },
         },
     }
}

[-- Attachment #3: mwe.tex --]
[-- Type: text/x-tex, Size: 1442 bytes --]

\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}

\stoptext

[-- Attachment #4: mwe.pdf --]
[-- Type: application/pdf, Size: 8146 bytes --]

[-- Attachment #5: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-31 15:06         ` Marcus Vinicius Mesquita
@ 2020-07-31 16:31           ` Hans Hagen
  2020-07-31 18:00             ` Marcus Vinicius Mesquita
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2020-07-31 16:31 UTC (permalink / raw)
  To: Marcus Vinicius Mesquita; +Cc: mailing list for ConTeXt users

On 7/31/2020 5:06 PM, Marcus Vinicius Mesquita wrote:
> Hi, again
> 
> With the suggestions you gave I managed to obtain the functionality I 
> need, almost.
> Somehow letters with accents like á ã é ó õ and also ç don't get the 
> same color of the base letters given in the colorfont.lfg below:
> 
> return {
>       name = "coloralphabet",
>       colorschemes = {
>           default = {
>           [1] = { "A", "a", "á", "ã", "å", "à", "ä" },
>           [2] = { "b", "B" },
>           [3] = { "c", "ç", "C", "Ç" },
>           [4] = { "d", "D" },
>           [5] = { "e", "E" },
>           [6] = { "f", "F" },
>           [7] = { "g", "G" },
>           [8] = { "h", "H" },
>           [9] = { "i", "í", "ì", "I", "Í", "Ì" },
>           [10] = { "j", "J" },
>           [11] = { "k", "K" },
>           [12] = { "l", "L" },
>           [13] = { "m", "M" },
>           [14] = { "n", "ñ", "N", "Ñ" },
>           [15] = { "o", "ó", "õ", "ö", "O", "Ó", "Õ", "Ö"  },
>           [16] = { "p", "P" },
>           [17] = { "q", "Q" },
>           [18] = { "r", "R" },
>           [19] = { "s", "S" },
>           [20] = { "t", "T" },
>           [21] = { "u", "ù", "ú", "ü", "U", "Ù", "Ú", "Ü" },
>           [22] = { "v", "V" },
>           [23] = { "w", "W" },
>           [24] = { "x", "X" },
>           [25] = { "y", "Y" },
>           [26] = { "z", "Z" },
>           },
>       }
> }
> 
> The MWE follows below:
> 
> \setupbodyfont[plex,22pt]
> 
> \definecolor[colorscheme:1:1][h=002776]  % a
> \definecolor[colorscheme:1:2][h=009c3b]  % b
> \definecolor[colorscheme:1:3][h=17737e]  % c
> \definecolor[colorscheme:1:4][h=ff5733]  % d
> \definecolor[colorscheme:1:5][h=493367]  % e
> \definecolor[colorscheme:1:6][h=7c6d11]  % f
> \definecolor[colorscheme:1:7][h=117c2a]  % g
> \definecolor[colorscheme:1:8][h=6d109d]  % h
> \definecolor[colorscheme:1:9][h=08d11a]  % i
> \definecolor[colorscheme:1:10][h=a81163] % j
> \definecolor[colorscheme:1:11][h=7d2830] % k
> \definecolor[colorscheme:1:12][h=2868d1] % l
> \definecolor[colorscheme:1:13][h=2c11da] % m
> \definecolor[colorscheme:1:14][h=cf47bb] % n
> \definecolor[colorscheme:1:15][h=27bde2] % o
> \definecolor[colorscheme:1:16][h=dc5777] % p
> \definecolor[colorscheme:1:17][h=c28201] % q
> \definecolor[colorscheme:1:18][h=ffdf00] % r
> \definecolor[colorscheme:1:19][h=30a777] % s
> \definecolor[colorscheme:1:20][h=722548] % t
> \definecolor[colorscheme:1:21][h=ff00ff] % u
> \definecolor[colorscheme:1:22][h=e0115f] % v
> \definecolor[colorscheme:1:23][h=004c4c] % w
> \definecolor[colorscheme:1:24][h=ae0001] % x
> \definecolor[colorscheme:1:25][h=696966] % y
> \definecolor[colorscheme:1:26][h=7bb3ff] % z
> 
> \definefontfeature
>     [MyFeaturesA] [default]
>     [goodies={colorfont},colorscheme=default]
> 
> \definefont[MyFontA][SerifBold*MyFeaturesA]
> 
> \starttext
> 
> \setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}
> 
> \stoptext
> 
> What needs to be changed?

glyph names ... "oacute" etc as used in plex

> Greetings
> 
> Marcus Vinicius
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-31 16:31           ` Hans Hagen
@ 2020-07-31 18:00             ` Marcus Vinicius Mesquita
  2020-07-31 20:10               ` Marcus Vinicius Mesquita
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus Vinicius Mesquita @ 2020-07-31 18:00 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


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

Thank you, that was very helpful.

Marcus Vinicius

[-- Attachment #1.2: Type: text/html, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-31 18:00             ` Marcus Vinicius Mesquita
@ 2020-07-31 20:10               ` Marcus Vinicius Mesquita
  2020-08-01  9:03                 ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Marcus Vinicius Mesquita @ 2020-07-31 20:10 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


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

Ok, after changing the glyph names in colorfont.lfg things run smoothly but
for six glyphs:

uacute, ucircumflex, udieresis, Uacute, Ucircumflex, Udieresis

Have I hit a bug?

Regards,

Marcus Vinicius

On Fri, Jul 31, 2020 at 3:00 PM Marcus Vinicius Mesquita <
marcusvinicius.mesquita@gmail.com> wrote:

> Thank you, that was very helpful.
>
> Marcus Vinicius
>
>

-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)

[-- Attachment #1.2: Type: text/html, Size: 1201 bytes --]

[-- Attachment #2: colorfont.lfg --]
[-- Type: application/octet-stream, Size: 1450 bytes --]

return {
     name = "coloralphabet",
     colorschemes = {
         default = {
         [1] = { "A", "a", "agrave", "aacute", "acircumflex", "atilde", "adieresis", "aring", "Agrave", "Aacute", "Acircumflex", "Atilde", "Adieresis", "Aring" },
         [2] = { "b", "B", "two" },
         [3] = { "c", "ccedilla", "C", "Ccedilla" },
         [4] = { "d", "D", "four" },
         [5] = { "e", "E", "egrave", "eacute", "ecircumflex", "edieresis", "Egrave", "Eacute", "Ecircumflex", "Edieresis" },
         [6] = { "f", "F" },
         [7] = { "g", "G" },
         [8] = { "h", "H" },
         [9] = { "i", "I", "igrave", "iacute", "icircumflex", "idieresis", "Igrave", "Iacute", "Icircumflex", "Idieresis" },
         [10] = { "j", "J" },
         [11] = { "k", "K" },
         [12] = { "l", "L" },
         [13] = { "m", "M" },
         [14] = { "n", "N" },
         [15] = { "o", "O", "ograve", "oacute", "ocircumflex", "otilde", "odieresis", "Ograve", "Oacute", "Ocircumflex", "Otilde", "Odieresis" },
         [16] = { "p", "P" },
         [17] = { "q", "Q" },
         [18] = { "r", "R" },
         [19] = { "s", "S" },
         [20] = { "t", "T" },
         [21] = { "u", "U", "ugrave", "uacute", "ucircumflex", "udieresis", "Ugrave", "Uacute", "Ucircumflex", "Udieresis" },
         [22] = { "v", "V" },
         [23] = { "w", "W" },
         [24] = { "x", "X" },
         [25] = { "y", "Y" },
         [26] = { "z", "Z" },
         },
     }
}

[-- Attachment #3: mwe.tex --]
[-- Type: text/x-tex, Size: 1514 bytes --]

\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1]
\MyFontA
\startlines
aàáâãäå AÀÁÂÃÄÅ
eèéêë EÈÉÊË
iìíîï IÌÍÎÏ
oòóôõö OÒÓÔÕÖ
uùúûü UÙÚÛÜ

\stoptext

[-- Attachment #4: mwe.pdf --]
[-- Type: application/pdf, Size: 8491 bytes --]

[-- Attachment #5: Type: text/plain, Size: 493 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Alphabet & color
  2020-07-31 20:10               ` Marcus Vinicius Mesquita
@ 2020-08-01  9:03                 ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2020-08-01  9:03 UTC (permalink / raw)
  To: Marcus Vinicius Mesquita; +Cc: mailing list for ConTeXt users

On 7/31/2020 10:10 PM, Marcus Vinicius Mesquita wrote:
> Ok, after changing the glyph names in colorfont.lfg things run smoothly 
> but for six glyphs:
> 
> uacute, ucircumflex, udieresis, Uacute, Ucircumflex, Udieresis
> 
> Have I hit a bug?

Some font oddness ... use

"uhungarumlaut", "Uhungarumlaut", 0x1DC, 0x144, 0xFA, 0xFB, 0xFC, 0xDA, 
0xDB, 0xDC },

Maybe use numbers for all instead. All is revealed by:

\usemodule[fonts-complete]
\setupbodyfont[6pt]
\starttext
     \ShowCompleteFont{name:IBMPlexSerif}{10pt}{1}
\stoptext

I'll send you a 'context' way of doing it ... .

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2020-08-01  9:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-16  5:32 Alphabet & color Marcus Vinicius Mesquita
2020-07-16  7:19 ` Hans Hagen
2020-07-16 16:41   ` Marcus Vinicius Mesquita
2020-07-16 16:57     ` Hans Hagen
2020-07-16 22:02       ` Marcus Vinicius Mesquita
2020-07-31 15:06         ` Marcus Vinicius Mesquita
2020-07-31 16:31           ` Hans Hagen
2020-07-31 18:00             ` Marcus Vinicius Mesquita
2020-07-31 20:10               ` Marcus Vinicius Mesquita
2020-08-01  9:03                 ` 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).