4 Commits
Author SHA1 Message Date
adminandClaude Opus 5.5 b24848ca5c Submodules: point at the Gitea repositories
The GitHub repositories are gone with the suspended account (or are
mirrored on Gitea). Relative URLs (../<repo>.git) resolve against wherever
this repository is cloned from.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 16:45:27 +01:00
Roman ChojnackiandClaude Opus 5.5 25aa00a192 MSVC: /Gw, so the linker drops unused data as it drops unused functions
The data counterpart of /Gy, which Release already sets, and of the
-fdata-sections GCC and Clang get. mojibake's unused tables go: the showcase
is about 100 KB smaller.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 10:38:36 +02:00
Roman ChojnackiandClaude Opus 5.5 d45b73c8c1 Submodules: mojibake 0.5.0, kb_text_shape 2.28g
mojibake 0.5.0 takes its text as an mjb_text, and its line breaker reports
the byte position of each break, so reaktor_text_break no longer works it
out from the iterator's index. Its bidi characters still carry byte_offset
at their last byte, so levels are still matched in order. kb_text_shape
2.28f removes unaligned reads that were undefined behavior.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 10:22:14 +02:00
Roman ChojnackiandClaude Opus 5.5 a29d97846d Onlay: its merged master, with CI and the README fixes
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 10:16:57 +02:00
8 changed files with 34 additions and 39 deletions
+13 -13
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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
View File
@@ -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;
}
+1 -1
View File
@@ -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
+1 -1