[HarfBuzz] hb-view hb-shape documentation

Eduardo Castineyra eduardo at brainstorm.es
Mon Sep 30 02:38:52 PDT 2013


Thanks Behdad,

Why is there a space at the beginning of the glyph list? (I attached the 
thai.txt file)

El 27/09/2013 18:41, Behdad Esfahbod escribió:
> On 13-09-27 12:36 PM, Eduardo Castineyra wrote:
>> This is the json file I got:
>>
>> hb-shape --font-file=leelawad.ttf --text-file=thai.txt --output-format=json
>> --output-file=thaiglyphs.txt --shapers=ot
>>
>> [{"g":"space","cl":0,"dx":0,"dy":0,"ax":0,"ay":0},{"g":"uni0E2B","cl":1,"dx":0,"dy":0,"ax":1207,"ay":0},{"g":"uni0E49","cl":1,"dx":217,"dy":0,"ax":0,"ay":0},{"g":"uni0E31","cl":1,"dx":114,"dy":500,"ax":0,"ay":0},{"g":"space","cl":4,"dx":0,"dy":0,"ax":1122,"ay":0},{"g":"uni0E2B","cl":5,"dx":0,"dy":0,"ax":1207,"ay":0},{"g":"uni0E31","cl":5,"dx":114,"dy":0,"ax":0,"ay":0},{"g":"space","cl":7,"dx":0,"dy":0,"ax":1122,"ay":0},{"g":"uni0E2B","cl":8,"dx":0,"dy":0,"ax":1207,"ay":0},{"g":"uni0E49","cl":8,"dx":217,"dy":0,"ax":0,"ay":0},{"g":"space","cl":10,"dx":0,"dy":0,"ax":1122,"ay":0},{"g":"uni0E2B","cl":11,"dx":0,"dy":0,"ax":1207,"ay":0},{"g":"uni0E31","cl":11,"dx":114,"dy":0,"ax":0,"ay":0},{"g":"uni0E49.sm","cl":11,"dx":114,"dy":500,"ax":0,"ay":0}]
>>
>>
>> I see the cluster, the deltas, the advances, but I'm still missing the glyph
>> indices for the font. Do you know what "uni0E49.sm" means?
> Those are glyph names.  Pass --no-glyph-names to get raw glyph number instead.
>
>
>> El 26/09/2013 20:23, Khaled Hosny escribió:
>>> Use --output-format=json, should be a bit more explanatory. Myself, I
>>> often forget which number is which, but you basically get glyph name,
>>> cluster value, X and Y advance and delta.
>>>
>>> The glyph name is equivalent to glyph index, just a bit more readable.
>>> The cluster value is basically the index of the corresponding character
>>> in the input string (though the relation can be complex). The advances
>>> and deltas are what HarfBuzz clients will use to calculate the absolute
>>> glyph position, HarfBuzz itself does not do that.
>>>
>>> Regards,
>>> Khaled
>>>
>>> On Thu, Sep 26, 2013 at 07:51:20PM +0200, Eduardo Castineyra wrote:
>>>> Now I see it, thanks!
>>>>
>>>> How should I interpret the outcome for hb-shape?
>>>>
>>>>> hb-shape leelawad.ttf --text-file=thai.txt
>>>> [space=0+0|uni0E2B=1+1207|uni0E49=1 at 217,0+0|uni0E31=1 at 114,500+0|space=4+1122|uni0E2B=5+1207|uni0E31=5 at 114,0+0|space=7+1122|uni0E2B=8+1207|uni0E49=8 at 217,0+0|spac
>>>>
>>>> e=10+1122|uni0E2B=11+1207|uni0E31=11 at 114,0+0|uni0E49.sm=11 at 114,500+0]
>>>>
>>>> What I would expect to see was the unicode, the index of the glyph
>>>> inside the leelawad.ttf font, and the screen position of the glyph.
>>>> But I don't what those numbers and symbols mean.
>>>>
>>>> El 26/09/2013 19:27, Khaled Hosny escribió:
>>>>> On Thu, Sep 26, 2013 at 06:48:26PM +0200, Eduardo Castineyra wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I was trying to use the hb-view and hb-shape tools but I don't get
>>>>>> how do they work.
>>>>>>
>>>>>> This is the output I got from hb-view, is there any documentation to
>>>>>> know what can I do with the outcome?
>>>>> If you don't specify an output file name, hb-view will do some sort of
>>>>> Unicode-art to draw the glyphs on the terminal. This works fine on
>>>>> Unicode-capable terminals, but I guess Windows’s cmd.exe is not such a
>>>>> one.  You can specify the output file name and format explicitly, see
>>>>> hb-view --help.
>>>>>
>>>>> Regards,
>>>>> Khaled
>> _______________________________________________
>> HarfBuzz mailing list
>> HarfBuzz at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/harfbuzz

-------------- next part --------------
ห้ั หั ห้ หั้


More information about the HarfBuzz mailing list