summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/luaharfbuzz
diff options
context:
space:
mode:
authorLuigi Scarso <luigi.scarso@gmail.com>2019-10-13 17:09:41 +0000
committerLuigi Scarso <luigi.scarso@gmail.com>2019-10-13 17:09:41 +0000
commit378030dd89abc0f2b0d9902dd343d1f2108a202f (patch)
tree65db6ed6a3bd3124cbb14b3634c3aae2401e5cd2 /Build/source/texk/web2c/luatexdir/luaharfbuzz
parentdf16ddc90a200f2c3a5f5724c8ad376a3258c298 (diff)
sync with upstream luatex rev. 7197
git-svn-id: svn://tug.org/texlive/trunk@52360 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/luaharfbuzz')
-rw-r--r--Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c
index d7840ae3cd0..ddb05581fae 100644
--- a/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c
+++ b/Build/source/texk/web2c/luatexdir/luaharfbuzz/src/luaharfbuzz/face.c
@@ -56,7 +56,7 @@ static int face_get_name(lua_State *L) {
hb_ot_name_id_t name_id = (hb_ot_name_id_t) luaL_checkinteger(L, 2);
hb_language_t lang = HB_LANGUAGE_INVALID;
char name[STATIC_ARRAY_SIZE];
- int text_size = STATIC_ARRAY_SIZE, len;
+ unsigned int text_size = STATIC_ARRAY_SIZE, len;
if (lua_gettop(L) > 2)
lang = *((Language*)luaL_checkudata(L, 3, "harfbuzz.Language"));
@@ -105,7 +105,7 @@ static int face_get_table_tags(lua_State *L) {
count = STATIC_ARRAY_SIZE;
hb_face_get_table_tags(*f, offset, &count, tags);
for (i = 0; i < count; i++) {
- lua_pushnumber(L, i + 1);
+ lua_pushnumber(L, offset + i + 1);
Tag *tp = (Tag *)lua_newuserdata(L, sizeof(*tp));
luaL_getmetatable(L, "harfbuzz.Tag");
@@ -137,7 +137,7 @@ static int face_ot_layout_get_script_tags(lua_State *L) {
count = STATIC_ARRAY_SIZE;
hb_ot_layout_table_get_script_tags(*face, *table, offset, &count, tags);
for (i = 0; i < count; i++) {
- lua_pushnumber(L, i + 1);
+ lua_pushnumber(L, offset + i + 1);
Tag *tp = (Tag *)lua_newuserdata(L, sizeof(*tp));
luaL_getmetatable(L, "harfbuzz.Tag");
@@ -170,7 +170,7 @@ static int face_ot_layout_get_language_tags(lua_State *L) {
count = STATIC_ARRAY_SIZE;
hb_ot_layout_script_get_language_tags(*face, *table, script_index, offset, &count, tags);
for (i = 0; i < count; i++) {
- lua_pushnumber(L, i + 1);
+ lua_pushnumber(L, offset + i + 1);
Tag *tp = (Tag *)lua_newuserdata(L, sizeof(*tp));
luaL_getmetatable(L, "harfbuzz.Tag");
@@ -204,7 +204,7 @@ static int face_ot_layout_get_feature_tags(lua_State *L) {
count = STATIC_ARRAY_SIZE;
hb_ot_layout_language_get_feature_tags(*face, *table, script_index, language_index, offset, &count, tags);
for (i = 0; i < count; i++) {
- lua_pushnumber(L, i + 1);
+ lua_pushnumber(L, offset + i + 1);
Tag *tp = (Tag *)lua_newuserdata(L, sizeof(*tp));
luaL_getmetatable(L, "harfbuzz.Tag");
@@ -241,7 +241,7 @@ static int face_ot_layout_find_language(lua_State *L) {
Tag *language = (Tag *)luaL_checkudata(L, 4, "harfbuzz.Tag");
unsigned int index = 0;
- int found = hb_ot_layout_script_find_language(*face, *table, script_index, *language, &index);
+ int found = hb_ot_layout_script_select_language(*face, *table, script_index, 1, &(*language), &index);
lua_pushboolean(L, found);
lua_pushinteger(L, index);
return 2;
@@ -320,7 +320,7 @@ static int face_ot_color_palette_get_colors(lua_State *L) {
for (i = 0; i < count; i++) {
hb_color_t color = colors[i];
- lua_pushnumber(L, i+1); // 1-indexed key parent table
+ lua_pushnumber(L, offset + i + 1); // 1-indexed key parent table
lua_createtable(L, 0, 4); // child table
lua_pushinteger(L, hb_color_get_red(color));
@@ -371,7 +371,7 @@ static int face_ot_color_glyph_get_layers(lua_State *L) {
if (color_index != 0xFFFF)
color_index++; // make it 1-indexed
- lua_pushnumber(L, i+1); // 1-indexed key parent table
+ lua_pushnumber(L, offset + i + 1); // 1-indexed key parent table
lua_createtable(L, 0, 2); // child table
lua_pushinteger(L, layer.glyph);