afdko icon indicating copy to clipboard operation
afdko copied to clipboard

[makeotf] GOADB possible to specify null Unicode value when naming as uniXXXX/uXXXX[XX]?

Open NightFurySL2001 opened this issue 2 years ago • 1 comments

Is it possible for the GOADB file to specifically not give any Unicode value (i.e. null) to glyphs with naming such as uniXXXX/uXXXX[XX]? It is not specified in the documentation but it might be a good thing to do.

My use case is as follow: In Source Han Sans, the glyph uni3127 is the horizontal form while uni3127-V is the vertical form for the bopomofo [i] letter. In China the horizontal form and vertical form are used in their respective writing directions, but for Taiwan and Hong Kong, the vertical form is used by default in both horizontal and vertical writing. The GOADB is as follow:

mapped as in China:

uni3127	uni3127	uni3127
uni3127_V	uni3127_V

mapped as in Taiwan:

uni3127	uni3127
uni3127_V	uni3127_V	uni3127

However, when running the code with "mapped as in Taiwan" GOADB, the following error is raised: FATAL: cmap{plat=3,script=1,lang=0}: multiple glyphs (uni3127,uni3127-V) mapped to code <3127>

My current workaround is to specifically rename uni3127 to uni3127_H to skip over the default behaviour of assigning Unicode based on name. However, that breaks the range of bopomofo with one only named _H. Is it considerable to introduce some way to mark a glyph with the name format uniXXXX/uXXXX[XX] as no Unicode value assigned / null Unicode value?

NightFurySL2001 avatar Mar 02 '23 12:03 NightFurySL2001

You need to use the override column with NULL, then no code point will be assigned (tested with both AGD- and uniXXXX names):

C (one code point assigned based on left column, one unencoded glyph):

uni3127	uni3127
uni3127_V	uni3127_V

T (one code point deleted, 0x3126 assigned to previously unencoded glyph):

uni3127	uni3127	NULL
uni3127_V	uni3127_V	uni3127

frankrolf avatar Jan 22 '25 20:01 frankrolf

Seems like this is addressed.

skef avatar May 07 '25 03:05 skef