ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Harfbuzz plugin and colors
@ 2022-02-14  2:47 Jairo A. del Rio via ntg-context
  2022-02-14  7:05 ` Aditya Mahajan via ntg-context
  2022-02-14  8:21 ` Hans Hagen via ntg-context
  0 siblings, 2 replies; 3+ messages in thread
From: Jairo A. del Rio via ntg-context @ 2022-02-14  2:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jairo A. del Rio


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

Hi, list! I've tested the Harfbuzz plugin in ConTeXt and it works nicely
for most cases. However, color doesn't seem to work. Is this intended? I
know this plugin won't be supported, but I'll be fine with pointers to
solve this issue. Thanks in advance.

\usemodule[fonts-plugins]
\definefontfeature[harf]
  [mode=plug,
   features=harfbuzz,
   shaper=native]
%Just to test Harfbuzz is actually working
\definefontfeature[devaA][harf]
  [language=dflt,
   script=deva]
\definefontfeature[devaB][default]
  [script=deva]
\definefontfeature[colored][harf]
  [language=dflt,script=arab,
   colr=yes] %doesn't do anything
\startbuffer[hindi]
%From a Wikipedia page
हिन्‍दी भाषा का इतिहास लगभग एक सहस्र वर्ष पुराना माना गया है। हिन्‍दी भाषा
व साहित्‍य के जानकार अपभ्रंश की अन्तिम अवस्‍था 'अवहट्ठ से हिन्‍दी का उद्भव
स्‍वीकार करते हैं। चन्द्रधर शर्मा 'गुलेरी' ने इसी अवहट्ठ को 'पुरानी हिन्दी'
नाम दिया।

अपभ्रंश की समाप्ति और आधुनिक भारतीय भाषाओं के जन्मकाल के समय को
संक्रान्तिकाल कहा जा सकता है। हिन्दी का स्वरूप शौरसेनी और अर्धमागधी
अपभ्रंशों से विकसित हुआ है। 1000 ई॰ के आसपास इसकी स्वतन्त्र सत्ता का परिचय
मिलने लगा था, जब अपभ्रंश भाषाएँ साहित्यिक सन्दर्भों में प्रयोग में आ रही
थीं। यही भाषाएँ बाद में विकसित होकर आधुनिक भारतीय आर्य भाषाओं के रूप में
अभिहित हुईं। अपभ्रंश का जो भी कथ्य रूप था - वही आधुनिक बोलियों में विकसित
हुआ।
\stopbuffer
\starttext
{\righttoleft\definedfont[file:AmiriQuranColored.ttf*colored]\input{khatt-ar}}

{\definedfont[file:Lohit-Devanagari.ttf*devaA]\getbuffer[hindi]}
\blank[line]
{\definedfont[file:Lohit-Devanagari.ttf*devaB]\getbuffer[hindi]}
\stoptext

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

[-- Attachment #2: harfbuzz-tests.pdf --]
[-- Type: application/pdf, Size: 24634 bytes --]

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

* Re: Harfbuzz plugin and colors
  2022-02-14  2:47 Harfbuzz plugin and colors Jairo A. del Rio via ntg-context
@ 2022-02-14  7:05 ` Aditya Mahajan via ntg-context
  2022-02-14  8:21 ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 3+ messages in thread
From: Aditya Mahajan via ntg-context @ 2022-02-14  7:05 UTC (permalink / raw)
  To: Jairo A. del Rio via ntg-context; +Cc: Aditya Mahajan

On Sun, 13 Feb 2022, Jairo A. del Rio via ntg-context wrote:

> Hi, list! I've tested the Harfbuzz plugin in ConTeXt and it works nicely
> for most cases. However, color doesn't seem to work. Is this intended? I
> know this plugin won't be supported, but I'll be fine with pointers to
> solve this issue. Thanks in advance.
> 
> \usemodule[fonts-plugins]
> \definefontfeature[harf]
>   [mode=plug,
>    features=harfbuzz,
>    shaper=native]
> %Just to test Harfbuzz is actually working
> \definefontfeature[devaA][harf]
>   [language=dflt,
>    script=deva]
> \definefontfeature[devaB][default]
>   [script=deva]
> \definefontfeature[colored][harf]
>   [language=dflt,script=arab,
>    colr=yes] %doesn't do anything

Wouldn't you also have to enable the colored feature somewhere?

> \starttext
> {\righttoleft\definedfont[file:AmiriQuranColored.ttf*colored]\input{khatt-ar}}
> 
> {\definedfont[file:Lohit-Devanagari.ttf*devaA]\getbuffer[hindi]}
> \blank[line]
> {\definedfont[file:Lohit-Devanagari.ttf*devaB]\getbuffer[hindi]}
> \stoptext

Aditya
___________________________________________________________________________________
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] 3+ messages in thread

* Re: Harfbuzz plugin and colors
  2022-02-14  2:47 Harfbuzz plugin and colors Jairo A. del Rio via ntg-context
  2022-02-14  7:05 ` Aditya Mahajan via ntg-context
@ 2022-02-14  8:21 ` Hans Hagen via ntg-context
  1 sibling, 0 replies; 3+ messages in thread
From: Hans Hagen via ntg-context @ 2022-02-14  8:21 UTC (permalink / raw)
  To: Jairo A. del Rio via ntg-context; +Cc: Hans Hagen

On 2/14/2022 3:47 AM, Jairo A. del Rio via ntg-context wrote:
> Hi, list! I've tested the Harfbuzz plugin in ConTeXt and it works nicely 
> for most cases. However, color doesn't seem to work. Is this intended? I 
> know this plugin won't be supported, but I'll be fine with pointers to 
> solve this issue. Thanks in advance.
> 
> \usemodule[fonts-plugins]
> \definefontfeature[harf]
>    [mode=plug,
>     features=harfbuzz,
>     shaper=native]
> %Just to test Harfbuzz is actually working
> \definefontfeature[devaA][harf]
>    [language=dflt,
>     script=deva]
> \definefontfeature[devaB][default]
>    [script=deva]
> \definefontfeature[colored][harf]
>    [language=dflt,script=arab,
>     colr=yes] %doesn't do anything
> \startbuffer[hindi]
i honestely have no clue if color will work (also because hb is in a 
sort of continuous flux wrt updates and so, and i tend not to update 
libraries without knowing why) .. as long as there is nothing needed 
that is handled by node mode such things should work

keep in mind that this is just there because idris and i wanted to 
compare the output different rendering approaches (on windows one can 
use the uniscribe mode and uniscribe is sort of the reference so in case 
of doubt we try to follow that) but i haven't looked at if for years

using that plugin is it's a bit of a gamble wrt what features to enable 
adn what heuristics kick in, but you can try at least to enable arabic

\definefontfeature[colored][arabic,harf]
    [language=dflt,script=arab,
     colr=yes] %doesn't do anything

however, it looks like i have to itercept a default color (doesn't 
relate to plugins) so i'll send you the one-line patch for that (at 
least in node mode that works)

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

end of thread, other threads:[~2022-02-14  8:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14  2:47 Harfbuzz plugin and colors Jairo A. del Rio via ntg-context
2022-02-14  7:05 ` Aditya Mahajan via ntg-context
2022-02-14  8:21 ` Hans Hagen via ntg-context

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