Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b24848ca5c | ||
|
|
25aa00a192 | ||
|
|
d45b73c8c1 | ||
|
|
a29d97846d |
+13
-13
@@ -1,39 +1,39 @@
|
||||
[submodule "external/nuklear"]
|
||||
path = external/nuklear
|
||||
url = https://github.com/Immediate-Mode-UI/Nuklear.git
|
||||
url = ../Nuklear.git
|
||||
[submodule "external/plutosvg"]
|
||||
path = external/plutosvg
|
||||
url = https://github.com/sammycage/plutosvg.git
|
||||
url = ../plutosvg.git
|
||||
[submodule "external/ionicons"]
|
||||
path = external/ionicons
|
||||
url = https://github.com/ionic-team/ionicons.git
|
||||
url = ../ionicons.git
|
||||
[submodule "external/SDL"]
|
||||
path = external/SDL
|
||||
url = https://github.com/libsdl-org/SDL.git
|
||||
url = ../SDL.git
|
||||
[submodule "external/lcui"]
|
||||
path = external/lcui
|
||||
url = https://github.com/lc-soft/LCUI.git
|
||||
url = ../LCUI.git
|
||||
[submodule "external/onlay"]
|
||||
path = external/onlay
|
||||
url = https://github.com/Alpaq92/Onlay.git
|
||||
url = ../Onlay.git
|
||||
[submodule "external/mojibake"]
|
||||
path = external/mojibake
|
||||
url = https://github.com/zaerl/mojibake.git
|
||||
url = ../mojibake.git
|
||||
[submodule "external/kb"]
|
||||
path = external/kb
|
||||
url = https://github.com/JimmyLefevre/kb.git
|
||||
url = ../kb.git
|
||||
[submodule "external/nukanim"]
|
||||
path = external/nukanim
|
||||
url = https://github.com/Alpaq92/NukAnim.git
|
||||
url = ../NukAnim.git
|
||||
[submodule "external/mglibs"]
|
||||
path = external/mglibs
|
||||
url = https://github.com/mattiasgustavsson/libs.git
|
||||
url = ../libs.git
|
||||
[submodule "external/watercss"]
|
||||
path = external/watercss
|
||||
url = https://github.com/kognise/water.css
|
||||
url = ../water.css.git
|
||||
[submodule "external/simplecss"]
|
||||
path = external/simplecss
|
||||
url = https://github.com/kevquirk/simple.css
|
||||
url = ../simple.css.git
|
||||
[submodule "external/freetype"]
|
||||
path = external/freetype
|
||||
url = https://github.com/freetype/freetype
|
||||
url = ../freetype.git
|
||||
|
||||
@@ -74,7 +74,7 @@ regression oracle for every layout or style change.
|
||||
`core/text/text.c` and drawn from the custom command it swaps in for
|
||||
Nuklear's text command, so a change to how Nuklear or the renderer places
|
||||
glyphs does not reach it. Its bidi levels are matched to mojibake's by order:
|
||||
mojibake 0.4.1 records `byte_offset` at a character's last byte.
|
||||
mojibake 0.5.0 records `byte_offset` at a character's last byte.
|
||||
- **Only Nuklear's active window gets input.** Every other window carries a
|
||||
sticky `NK_WINDOW_ROM` until a click or hover activates it inside
|
||||
`nk_begin`. A layer that must not take input is begun
|
||||
|
||||
+5
-2
@@ -56,8 +56,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD")
|
||||
set(SDL_DEPS_SHARED OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
# A static program keeps only the functions it calls; MSVC's Release does this already.
|
||||
if(NOT MSVC AND NOT EMSCRIPTEN)
|
||||
# A static program keeps only the functions and data it uses. MSVC's Release
|
||||
# already splits functions; /Gw splits data.
|
||||
if(MSVC)
|
||||
add_compile_options(/Gw)
|
||||
elseif(NOT EMSCRIPTEN)
|
||||
add_compile_options(-ffunction-sections -fdata-sections)
|
||||
endif()
|
||||
add_subdirectory("${TP}/SDL" EXCLUDE_FROM_ALL)
|
||||
|
||||
+11
-19
@@ -271,14 +271,15 @@ static void
|
||||
levels(const char *s, int len, int n)
|
||||
{
|
||||
mjb_bidi_paragraph p;
|
||||
mjb_text text = mjb_text_utf8(s, (size_t)len);
|
||||
int i, k = 0;
|
||||
|
||||
for (i = 0; i < n && g_ch[i].cp < 0x0590; i++) {}
|
||||
if (i == n ||
|
||||
mjb_bidi_resolve(s, (size_t)len, MJB_ENC_UTF_8, MJB_DIRECTION_AUTO, &p)
|
||||
mjb_bidi_resolve(&text, MJB_DIRECTION_AUTO, &p)
|
||||
!= MJB_STATUS_OK)
|
||||
return;
|
||||
/* mojibake 0.4.1 puts byte_offset at a character's last byte. */
|
||||
/* mojibake 0.5.0 puts byte_offset at a character's last byte. */
|
||||
for (i = 0; i < n; i++) {
|
||||
if (k < (int)p.count && (int)p.chars[k].codepoint == g_ch[i].cp)
|
||||
g_ch[i].level = p.chars[k++].level;
|
||||
@@ -878,25 +879,16 @@ reaktor_text_prepare(struct nk_context *ctx, struct SDL_Renderer *renderer)
|
||||
int
|
||||
reaktor_text_break(const char *s, int len, int limit)
|
||||
{
|
||||
mjb_next_line_state st;
|
||||
mjb_break_type t;
|
||||
int best = 0;
|
||||
mjb_text text = mjb_text_utf8(s, (size_t)len);
|
||||
mjb_line_break_state st;
|
||||
mjb_break_type t;
|
||||
int best = 0;
|
||||
|
||||
if (len <= 0 || limit <= 0) return 0;
|
||||
st.index = 0;
|
||||
while ((t = mjb_next_line_break(s, (size_t)len, MJB_ENC_UTF_8, &st))
|
||||
!= MJB_BT_NOT_SET) {
|
||||
/* The boundary is before the character ending at st.index. */
|
||||
int at = (int)st.index;
|
||||
|
||||
if (at > len) {
|
||||
at = len;
|
||||
} else {
|
||||
at--;
|
||||
while (at > 0 && ((unsigned char)s[at] & 0xC0) == 0x80) at--;
|
||||
}
|
||||
if (at > limit) break;
|
||||
if (t == MJB_BT_ALLOWED || t == MJB_BT_MANDATORY) best = at;
|
||||
SDL_zero(st);
|
||||
while ((t = mjb_line_break_next(&text, &st)) != MJB_BT_NOT_SET) {
|
||||
if ((int)st.position > limit) break;
|
||||
if (t == MJB_BT_ALLOWED || t == MJB_BT_MANDATORY) best = (int)st.position;
|
||||
}
|
||||
return best;
|
||||
}
|
||||
|
||||
@@ -1427,7 +1427,7 @@ so Nuklear measures as it will draw. Before the frame becomes vertices,
|
||||
custom command in the same place, whose callback adds the glyph quads.
|
||||
Shaping is cached by string and font, glyphs by font, glyph and size; each
|
||||
cache starts over when full. Its bidi levels match mojibake's by order, since
|
||||
mojibake 0.4.1 records `byte_offset` at a character's last byte.
|
||||
mojibake 0.5.0 records `byte_offset` at a character's last byte.
|
||||
|
||||
**Fonts are the application's.** The showcase ships M PLUS 1p for Japanese, as
|
||||
a `.font_fallbacks` entry; Arabic, Hebrew or an Indic script needs a font that
|
||||
|
||||
Vendored
+1
-1
Submodule external/kb updated: cc63806775...7d811ad802
Vendored
+1
-1
Submodule external/mojibake updated: aa3cc68b9b...ad2831dedd
Vendored
+1
-1
Submodule external/onlay updated: 0c75a1f91b...877047c09d
Reference in New Issue
Block a user