Fix full-length SMS rendering and Unicode-aware segment counting
The expanded xsms conversation view handed the whole message body to pango_xft_render_layout() as one multiline layout; on the target Pango/Xft stack that call only paints the first line, so long concatenated/UCS-2 messages (e.g. the Ukrainian 'Мелорінг дарує хіти!' example) stopped right before the first non-ASCII character. Verified on the connected phone with an instrumented sms.so (530-byte body, 13 measured lines, one painted line) and a standalone ARM reproducer; the QMI WMS reassembly and sms.txt parser are correct. - Draw message bodies and long drafts line by line via a shared renderLayoutLines() helper with an Xft clip, so nothing overflows the bubble or softkey bar; use the same layout width for measuring and drawing. - Make the selected message scrollable with Up/Down (one line per press plus a right-edge scrollbar), stepping to the previous/next message only at the top/bottom of an overflowing message. - Replace the byte-based compose counter with smsTextMetrics(), which decodes UTF-8, detects the GSM 7-bit alphabet/extension table and reports GSM-7 septets (160/153) or UCS-2 UTF-16 units (70/67) with the right part count. - Strip [SIM n] tags from QMI/local SMS log headers and stop writing them in the offline-send fallback; log units instead of bytes. - Add a check-rebuild.sh guard against reintroducing the bulk layout render. - Rebuild prebuilt/overlay sms.so and engmenu.so, sync docs, and regenerate images/bananarchy-nokia-argon.img.
This commit is contained in:
1 parent
8078f211e5
commit
16df110b0b
10 files changed
+266
-30
No files matched your search
@@ -141,6 +141,21 @@ if ! "$BASE_DIR/scripts/sync-prebuilt-overlay.sh" --check; then
|
||||
fail "overlay/rootfs artifacts differ from prebuilt/"
|
||||
fi
|
||||
|
||||
echo "[check] SMS long-message rendering..."
|
||||
SMS_SRC="$BASE_DIR/src/dwm-plugins/sms_plugin.cpp"
|
||||
SMS_HDR="$BASE_DIR/src/dwm-plugins/phone_data.h"
|
||||
if grep -qE '^[[:space:]]*pango_xft_render_layout\(' "$SMS_SRC"; then
|
||||
fail "sms_plugin.cpp must not bulk-render multiline message bodies"
|
||||
fi
|
||||
if ! grep -q 'pango_xft_render_layout_line(' "$SMS_SRC"; then
|
||||
fail "sms_plugin.cpp lost its line-by-line message body renderer"
|
||||
fi
|
||||
for token in msgScrollPx smsTextMetrics stripSmsSimTag; do
|
||||
if ! grep -q "$token" "$SMS_SRC" && ! grep -q "$token" "$SMS_HDR"; then
|
||||
fail "sms plugin lost $token"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[check] Local agent config stays ignored..."
|
||||
if [ -d "$BASE_DIR/.git" ]; then
|
||||
if ! git -C "$BASE_DIR" check-ignore -q .bantam.cfg; then
|
||||
|
||||
Reference in new issue
Block a user