のねのBlog

パソコンやソフト開発で起きた問題など書きます。よろしくお願いします。

hb-shape

$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf
[uni0E27=0+558|uni0E31=0+0|uni0E19=2+684|uni0E19=3+684|uni0E35=3@-44,0+0|uni0E49=3@-41,0+0]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --output-format=json
[{"g":"uni0E27","cl":0,"dx":0,"dy":0,"ax":558,"ay":0},{"g":"uni0E31","cl":0,"dx":0,"dy":0,"ax":0,"ay":0},
{"g":"uni0E19","cl":2,"dx":0,"dy":0,"ax":684,"ay":0},{"g":"uni0E19","cl":3,"dx":0,"dy":0,"ax":684,"ay":0},
{"g":"uni0E35","cl":3,"dx":-44,"dy":0,"ax":0,"ay":0},{"g":"uni0E49","cl":3,"dx":-41,"dy":0,"ax":0,"ay":0}]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --show-text
(วันนี้)
[uni0E27=0+558|uni0E31=0+0|uni0E19=2+684|uni0E19=3+684|uni0E35=3@-44,0+0|uni0E49=3@-41,0+0]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --show-unicode
<U+0E27,U+0E31,U+0E19,U+0E19,U+0E35,U+0E49>
[uni0E27=0+558|uni0E31=0+0|uni0E19=2+684|uni0E19=3+684|uni0E35=3@-44,0+0|uni0E49=3@-41,0+0]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --show-line-num
1: [uni0E27=0+558|uni0E31=0+0|uni0E19=2+684|uni0E19=3+684|uni0E35=3@-44,0+0|uni0E49=3@-41,0+0]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --verbose
1: (&#3623;&#3633;&#3609;&#3609;&#3637;&#3657;)
1: <U+0E27,U+0E31,U+0E19,U+0E19,U+0E35,U+0E49>
1: [uni0E27=0+558|uni0E31=0+0|uni0E19=2+684|uni0E19=3+684|uni0E35=3@-44,0+0|uni0E49=3@-41,0+0]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --show-extents
[uni0E27=0+558<15,607,432,-610>|uni0E31=0+0<-390,961,470,-231>|uni0E19=2+684<15,607,647,-610>|uni0E19=3+684<15,607,647,-610>|uni0E35=3@-44,0+0<-561,979,461,-302>|uni0E49=3@-41,0+0<-332,1233,349,-229>]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --no-clusters
[uni0E27+558|uni0E31+0|uni0E19+684|uni0E19+684|uni0E35@-44,0+0|uni0E49@-41,0+0]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --no-glyph-names[244=0+558|254=0+0|230=2+684|230=3+684|258=3@-44,0+0|274=3@-41,0+0]
$ printf '\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49' | hb-shape ./Garuda.ttf --no-positions
[uni0E27=0|uni0E31=0|uni0E19=2|uni0E19=3|uni0E35=3|uni0E49=3]