Skip to content

android: keepWords joins Korean words only (0.12.1) - #170

Merged
jlc488 merged 1 commit into
mainfrom
fix/android-keepwords-scripts
Nov 19, 2026
Merged

jlc488 merged 1 commit into
mainfrom
fix/android-keepwords-scripts

Conversation

@jlc488

@jlc488 jlc488 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

What

keepWords() now joins Korean words only (Android 0.12.1).

It put a WORD JOINER between every two characters of every word, whatever the script:

  • Hindi, Thai: each vowel sign was drawn apart from its consonant, on a dotted circle. Reproduced on a real phone in Qooroo (tabs, titles, search fields).
  • Japanese, Chinese: no spaces, so the whole label became one unbreakable run and broke wherever it ran out of room (送/る).

Now only a word that contains Hangul is joined, and the joiner goes between grapheme clusters, so a letter keeps its combining marks. Korean wraps exactly as before. Every DDS component that draws wrapping text goes through this function, so buttons, tabs, fields and banners are fixed with it.

Checked

  • New tests written first and seen failing: text without Hangul is returned as it is (Devanagari, Thai, Arabic, Japanese, Chinese, Latin, Cyrillic); a letter is never separated from its combining mark; Latin, digits and punctuation stay joined to the Korean word they belong to.
  • Local: testDebugUnitTest (105 tests, 0 failures), lintDebug, release builds of the three libraries.
  • On a Samsung fold with this build published to Maven Local and used by Qooroo: Hindi renders correctly, the Japanese button wraps before the parenthesis.

Not checked

  • Thai on a device (the same cause, covered by the unit test only).
  • The catalog app on a device.

무엇을

keepWords()가 한국어 단어만 묶습니다(Android 0.12.1).

지금까지는 글자 종류와 상관없이 모든 단어의 모든 글자 사이에 결합 문자(WORD JOINER)를 넣었습니다.

  • 힌디어, 태국어: 모음 기호가 자음과 떨어져 점선 동그라미 위에 그려졌습니다. 쿠루 실기기에서 재현했습니다(탭, 제목, 검색창).
  • 일본어, 중국어: 띄어쓰기가 없어 문구 전체가 끊을 수 없는 한 덩어리가 되고, 넘치는 자리에서 아무 데서나 잘렸습니다(送/る).

이제 한글이 든 단어만 묶고, 결합 문자는 온전한 글자(자소 묶음) 사이에만 넣습니다. 한국어 줄바꿈은 그대로입니다. 줄바꿈되는 글을 그리는 DDS 부품이 모두 이 함수를 쓰므로 버튼·탭·입력칸·배너가 함께 고쳐집니다.

확인한 것

  • 테스트를 먼저 쓰고 실패를 본 뒤 고쳤습니다: 한글이 없는 글은 그대로 돌려줌(데바나가리, 태국어, 아랍어, 일본어, 중국어, 라틴, 키릴), 글자와 결합 기호가 떨어지지 않음, 한국어 단어에 붙은 영문·숫자·문장부호는 함께 묶임.
  • 로컬: testDebugUnitTest(105개, 실패 0), lintDebug, 세 라이브러리 릴리스 빌드.
  • 삼성 폴드에서 이 빌드를 Maven Local로 게시해 쿠루에 넣어 확인: 힌디어 정상, 일본어 버튼은 괄호 앞에서 줄바꿈.

확인하지 못한 것

  • 태국어 실기기(원인이 같고 단위 테스트로만 확인).
  • 카탈로그 앱 실기기.

keepWords put a word joiner between every two characters of every word. In Hindi and Thai that separated vowel signs from their consonants (drawn on dotted circles); in Japanese and Chinese it left a line no break point. Only a word that contains Hangul is joined now, between whole characters.
@jlc488
jlc488 merged commit 9e1899a into main Nov 19, 2026
3 checks passed
@jlc488
jlc488 deleted the fix/android-keepwords-scripts branch November 19, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant