Add script and language to buffer
This commit is contained in:
parent
8a3511ac6c
commit
ae070b7d39
1
TODO
1
TODO
@ -1,4 +1,3 @@
|
||||
- cmap14 support in get_glyph callback
|
||||
- Use size_t in sanitize?
|
||||
- Buffer error handling?
|
||||
- Better define HB_INTERNAL
|
||||
|
@ -71,10 +71,10 @@ struct _hb_buffer_t {
|
||||
hb_reference_count_t ref_count;
|
||||
|
||||
/* Information about how the text in the buffer should be treated */
|
||||
|
||||
hb_unicode_funcs_t *unicode;
|
||||
hb_direction_t direction;
|
||||
|
||||
hb_script_t script;
|
||||
hb_language_t language;
|
||||
|
||||
/* Buffer contents */
|
||||
|
||||
|
@ -146,6 +146,32 @@ hb_buffer_get_direction (hb_buffer_t *buffer)
|
||||
return buffer->direction;
|
||||
}
|
||||
|
||||
void
|
||||
hb_buffer_set_script (hb_buffer_t *buffer,
|
||||
hb_script_t script)
|
||||
{
|
||||
buffer->script = script;
|
||||
}
|
||||
|
||||
hb_script_t
|
||||
hb_buffer_get_script (hb_buffer_t *buffer)
|
||||
{
|
||||
return buffer->script;
|
||||
}
|
||||
|
||||
void
|
||||
hb_buffer_set_language (hb_buffer_t *buffer,
|
||||
hb_language_t language)
|
||||
{
|
||||
buffer->language = language;
|
||||
}
|
||||
|
||||
hb_language_t
|
||||
hb_buffer_get_language (hb_buffer_t *buffer)
|
||||
{
|
||||
return buffer->language;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
hb_buffer_clear (hb_buffer_t *buffer)
|
||||
|
@ -30,6 +30,7 @@
|
||||
|
||||
#include "hb-common.h"
|
||||
#include "hb-unicode.h"
|
||||
#include "hb-language.h"
|
||||
|
||||
HB_BEGIN_DECLS
|
||||
|
||||
@ -88,7 +89,6 @@ hb_buffer_set_unicode_funcs (hb_buffer_t *buffer,
|
||||
hb_unicode_funcs_t *
|
||||
hb_buffer_get_unicode_funcs (hb_buffer_t *buffer);
|
||||
|
||||
|
||||
void
|
||||
hb_buffer_set_direction (hb_buffer_t *buffer,
|
||||
hb_direction_t direction);
|
||||
@ -96,6 +96,19 @@ hb_buffer_set_direction (hb_buffer_t *buffer,
|
||||
hb_direction_t
|
||||
hb_buffer_get_direction (hb_buffer_t *buffer);
|
||||
|
||||
void
|
||||
hb_buffer_set_script (hb_buffer_t *buffer,
|
||||
hb_script_t script);
|
||||
|
||||
hb_script_t
|
||||
hb_buffer_get_script (hb_buffer_t *buffer);
|
||||
|
||||
void
|
||||
hb_buffer_set_language (hb_buffer_t *buffer,
|
||||
hb_language_t language);
|
||||
|
||||
hb_language_t
|
||||
hb_buffer_get_language (hb_buffer_t *buffer);
|
||||
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user