m17n-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [m17n-list] Adding a Font Layout Table


From: K. Handa
Subject: Re: [m17n-list] Adding a Font Layout Table
Date: Sun, 29 Mar 2015 20:16:57 +0900

Sorry for the late response on this matter.

Richard Wordingham <address@hidden> writes:

> I'm trying to add a font layout table (FLT) for OpenType Layout fonts
> (well, that use the new HarfBuzz interpretation) for the Tai Tham
> script.  My aim is to use it for Emacs.
> 
> Is there an easy way of debugging such a layout?  It seems that I cannot
> induce Emacs to use the FLT, and I don't know why.  I am running Emacs
> with the Bash shell command
> 
> MDEBUG_ALL=1 M17NDIR=/home/richard/tham/m17n/lib emacs

Instead of MDEDBUG_ALL=1, please try MDEBUG_DATABASE=1
MDEBUG_FLT=3.  Then, when a FLT file is loaded, something
like this information is printed:

[DB] <font,layouter,dev2-otf,nil> from /usr/local/share/m17n/DEV2-OTF.flt

and when the code in FLT runs, something like this
information is printed:

 [FLT] (dev2-otf (freesans)
 [FLT]   (SOURCE 0939 093F 0902)
 [FLT]   (STAGE 0 "Cma" (0939 093F 0902)
 [FLT]     (SUBPART 0
 [FLT]      (COND
 [FLT]       (REGEX "^." "Cma" 1
 [FLT]        (COPY 0x939)))
 [FLT]      (COND
 [FLT]       (REGEX "^." "ma" 1
 [FLT]        (COPY 0x93F)))
 [FLT]      (COND
[...]

The first line shows which FLT runs for which font family.

> I get debug messages telling me that the new FLT has been loaded
> 
> [DB]  <font,layouter,lana-otf,nil>.
> 
> but no hint that shaping is being applied to the font.  I have added
> two hooks:
> 
> In truetype.fst:
> 
> (tai_tham
>  (nil
>   ((nil nil unicode-bmp :otf=lana) lana-otf)))
> 
> In SCRIPT.tbl:
> 
> (tai_tham (nod khh khb lo tts pi) (#x1A20 #x1A53) lana)
> 
> Should these hooks suffice from the m17n side?

When you use FLT via Emacs, you don't need those settings,
instead you should instruct Emacs to use your font for Tai
Tham as this:

(set-fontset-font nil 'tai-tham '("_YOUR_FONT_FAMILY_NAME_" . "unicode-bmp"))

---
K. Handa
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]