2 Commits
Author SHA1 Message Date
adminandClaude Opus 5.5 3a62f78849 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 865bd70f9c 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:35:05 +02:00
6 changed files with 24 additions and 16 deletions
+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.5.0 records `byte_offset` at a character's last byte.
mojibake 0.4.1 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
+19 -11
View File
@@ -271,15 +271,14 @@ 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(&text, MJB_DIRECTION_AUTO, &p)
mjb_bidi_resolve(s, (size_t)len, MJB_ENC_UTF_8, MJB_DIRECTION_AUTO, &p)
!= MJB_STATUS_OK)
return;
/* mojibake 0.5.0 puts byte_offset at a character's last byte. */
/* mojibake 0.4.1 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;
@@ -879,16 +878,25 @@ reaktor_text_prepare(struct nk_context *ctx, struct SDL_Renderer *renderer)
int
reaktor_text_break(const char *s, int len, int limit)
{
mjb_text text = mjb_text_utf8(s, (size_t)len);
mjb_line_break_state st;
mjb_break_type t;
int best = 0;
mjb_next_line_state st;
mjb_break_type t;
int best = 0;
if (len <= 0 || limit <= 0) return 0;
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;
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;
}
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.5.0 records `byte_offset` at a character's last byte.
mojibake 0.4.1 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