|
62 | 62 | ** SetDrawColor(red, green, blue[, alpha]) / SetDrawColor("<escapeStr>") |
63 | 63 | ** DrawImage({imgHandle|nil}, left, top, width, height[, tcLeft, tcTop, tcRight, tcBottom][, stackIdx[, maskIdx]]) maskIdx: use a stack layer as multiplicative mask |
64 | 64 | ** DrawImageQuad({imgHandle|nil}, x1, y1, x2, y2, x3, y3, x4, y4[, s1, t1, s2, t2, s3, t3, s4, t4][, stackIdx[, maskIdx]]) |
65 | | -** DrawString(left, top, align{"LEFT"|"CENTER"|"RIGHT"|"CENTER_X"|"RIGHT_X"}, height, font{"FIXED"|"VAR"|"VAR BOLD"}, "<text>") |
66 | | -** width = DrawStringWidth(height, font{"FIXED"|"VAR"|"VAR BOLD"}, "<text>") |
67 | | -** index = DrawStringCursorIndex(height, font{"FIXED"|"VAR"|"VAR BOLD"}, "<text>", cursorX, cursorY) |
| 65 | +** DrawString(left, top, align{"LEFT"|"CENTER"|"RIGHT"|"CENTER_X"|"RIGHT_X"}, height, font{"FIXED"|"VAR"|"VAR BOLD"|"FONTIN SC"|"FONTIN SC ITALIC"|"FONTIN ITALIC"}, "<text>") |
| 66 | +** width = DrawStringWidth(height, font{"FIXED"|"VAR"|"VAR BOLD"|"FONTIN SC"|"FONTIN SC ITALIC|"FONTIN ITALIC"}, "<text>") |
| 67 | +** index = DrawStringCursorIndex(height, font{"FIXED"|"VAR"|"VAR BOLD"|"FONTIN SC"|"FONTIN SC ITALIC|"FONTIN ITALIC"}, "<text>", cursorX, cursorY) |
68 | 68 | ** str = StripEscapes("<string>") |
69 | 69 | ** count = GetAsyncCount() |
70 | 70 | ** |
@@ -1068,7 +1068,7 @@ static int l_DrawString(lua_State* L) |
1068 | 1068 | ui->LAssert(L, lua_isstring(L, 5), "DrawString() argument 5: expected string, got %s", luaL_typename(L, 5)); |
1069 | 1069 | ui->LAssert(L, lua_isstring(L, 6), "DrawString() argument 6: expected string, got %s", luaL_typename(L, 6)); |
1070 | 1070 | static const char* alignMap[6] = { "LEFT", "CENTER", "RIGHT", "CENTER_X", "RIGHT_X", NULL }; |
1071 | | - static const char* fontMap[4] = { "FIXED", "VAR", "VAR BOLD", NULL }; |
| 1071 | + static const char* fontMap[7] = { "FIXED", "VAR", "VAR BOLD", "FONTIN SC", "FONTIN SC ITALIC", "FONTIN ITALIC", NULL}; |
1072 | 1072 | const float dpiScale = ui->renderer->VirtualScreenScaleFactor(); |
1073 | 1073 | const float left = lua_tonumber(L, 1) * dpiScale; |
1074 | 1074 | const float top = lua_tonumber(L, 2) * dpiScale; |
@@ -1101,7 +1101,7 @@ static int l_DrawStringWidth(lua_State* L) |
1101 | 1101 | ui->LAssert(L, lua_isnumber(L, 1), "DrawStringWidth() argument 1: expected number, got %s", luaL_typename(L, 1)); |
1102 | 1102 | ui->LAssert(L, lua_isstring(L, 2), "DrawStringWidth() argument 2: expected string, got %s", luaL_typename(L, 2)); |
1103 | 1103 | ui->LAssert(L, lua_isstring(L, 3), "DrawStringWidth() argument 3: expected string, got %s", luaL_typename(L, 3)); |
1104 | | - static const char* fontMap[4] = { "FIXED", "VAR", "VAR BOLD", NULL }; |
| 1104 | + static const char* fontMap[7] = { "FIXED", "VAR", "VAR BOLD", "FONTIN SC", "FONTIN SC ITALIC", "FONTIN ITALIC", NULL }; |
1105 | 1105 | const float dpiScale = ui->renderer->VirtualScreenScaleFactor(); |
1106 | 1106 | const lua_Number logicalHeight = lua_tonumber(L, 1); |
1107 | 1107 | int scaledHeight = static_cast<int>(std::lround(logicalHeight * dpiScale)); |
@@ -1131,7 +1131,7 @@ static int l_DrawStringCursorIndex(lua_State* L) |
1131 | 1131 | ui->LAssert(L, lua_isstring(L, 3), "DrawStringCursorIndex() argument 3: expected string, got %s", luaL_typename(L, 3)); |
1132 | 1132 | ui->LAssert(L, lua_isnumber(L, 4), "DrawStringCursorIndex() argument 4: expected number, got %s", luaL_typename(L, 4)); |
1133 | 1133 | ui->LAssert(L, lua_isnumber(L, 5), "DrawStringCursorIndex() argument 5: expected number, got %s", luaL_typename(L, 5)); |
1134 | | - static const char* fontMap[4] = { "FIXED", "VAR", "VAR BOLD", NULL }; |
| 1134 | + static const char* fontMap[7] = { "FIXED", "VAR", "VAR BOLD", "FONTIN SC", "FONTIN SC ITALIC", "FONTIN ITALIC", NULL }; |
1135 | 1135 | const lua_Number logicalHeight = lua_tonumber(L, 1); |
1136 | 1136 | const lua_Number logicalCursorX = lua_tonumber(L, 4); |
1137 | 1137 | const lua_Number logicalCursorY = lua_tonumber(L, 5); |
|
0 commit comments