[API] Add hb_buffer_add_latin1()
authorBehdad Esfahbod <behdad@behdad.org>
Mon, 26 Jan 2015 22:25:52 +0000 (14:25 -0800)
committerBehdad Esfahbod <behdad@behdad.org>
Mon, 26 Jan 2015 22:25:52 +0000 (14:25 -0800)
commit61820bc4ca1f02433db4be7c81f27cf97e2bd519
tree7512092ca7797c9d8417fff10bb934165c023830
parent78c6e86c04f12154c88b9f9264d0bd50b721699b
[API] Add hb_buffer_add_latin1()

This is by no ways to promote non-Unicode encodings.  This is an entry
point that takes Unicode codepoints that happen to all be the first
256 characters and hence fit in 8bit strings.  This is useful eg in Chrome
where strings that can fit in 8bit are implemented that way, and this
avoids copying into UTF-8 or UTF-16.

Perhaps we should rename this to hb_buffer_add_codepoints8().  I'm also
curious if anyone would be really interested in hb_buffer_add_codepoints16().

Please discuss!
src/hb-buffer.cc
src/hb-buffer.h
src/hb-utf-private.hh