char * hb_language_to_string(hb_language_t language)
cdef extern from "hb-ot-tag.h" :
- hb_script_t hb_ot_tag_to_script (char *sname)
+ hb_script_t hb_ot_tag_to_script (hb_tag_t tag)
cdef extern from "hb-buffer.h" :
ctypedef struct hb_buffer_t :
cdef hb_script_t scriptnum
language = hb_language_from_string(lang)
- scriptnum = hb_ot_string_to_script(script)
+ scriptnum = hb_ot_tag_to_script(hb_tag_from_string(script))
hb_buffer_set_script(self.buffer, scriptnum)
hb_buffer_set_language(self.buffer, language)
p.add_option('--nogui', action='store_true', help="Don't display a gui")
(opts, args) = p.parse_args()
-fpat = opts.font + ":weight="
+if opts.font.lower().endswith(".ttf") :
+ fpat = ":file="
+else :
+ fpat = ""
+fpat += opts.font + ":weight="
fpat += "bold" if opts.bold else "medium"
fpat += ":slant="
fpat += "italic" if opts.italic else "roman"
pPosition->y_offset = iGlyph->yOffset() - curradvy;
pPosition->x_advance = pPosition->x_offset + iGlyph->advanceWidth();
pPosition->y_advance = pPosition->y_offset + iGlyph->advanceHeight();
-// if (pPosition->x_advance < 0)
-// pPosition->x_advance = 0;
+ if (pPosition->x_advance < 0 && iGlyph->logicalIndex() != iGlyph->attachedClusterBase()->logicalIndex())
+ pPosition->x_advance = 0;
curradvx += pPosition->x_advance;
curradvy += pPosition->y_advance;
// fprintf(stderr, "%d@(%f, %f)+(%f, %f)\n", iGlyph->glyphID(), iGlyph->origin(), iGlyph->yOffset(), iGlyph->advanceWidth(), iGlyph->advanceHeight());
while (*p)
if (tag == *p)
return i;
+ p++;
}
return HB_SCRIPT_UNKNOWN;