https://github.com/amake/isittofu
Web app for figuring out if text will show up on mobile OSs
https://github.com/amake/isittofu
android flutter-apps ios mojibake tofu unicode
Last synced: 9 months ago
JSON representation
Web app for figuring out if text will show up on mobile OSs
- Host: GitHub
- URL: https://github.com/amake/isittofu
- Owner: amake
- License: apache-2.0
- Created: 2019-12-18T15:46:51.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T23:15:56.000Z (9 months ago)
- Last Synced: 2025-03-31T23:29:39.825Z (9 months ago)
- Topics: android, flutter-apps, ios, mojibake, tofu, unicode
- Language: Dart
- Homepage: https://tofu.quest
- Size: 7.2 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Is It Tofu?
This is a tool for figuring out if a given piece of text contains characters
that will become "tofu" on mobile platforms (specifically iOS and Android).
"Tofu" refers to the blank white square (□) sometimes shown in place of an
unsupported character.
## Methodology
The input text is split up into UTF-16 Unicode code units, and is compared
against data compiled by the
[CodePointCoverage](https://github.com/amake/CodePointCoverage) project.
Coverage is determined by inspecting the font files that are bundled with the
OS. If there is at least one font providing a glyph (more specifically, with an
entry in the `cmap` table) for a given codepoint, that codepoint is considered
"covered".
For iOS, the fonts are taken from the iOS Simulator runtimes bundled with
various versions of Xcode. For Android, the fonts are taken from the Android
Emulator system images downloadable with the Android SDK.
Note that this methodology is not completely accurate. Known issues:
- Codepoints need not have their own glyphs to be considered "supported"; see
e.g. [variation
selectors](https://en.wikipedia.org/wiki/Variation_Selectors_(Unicode_block))
- Codepoint-level analysis cannot account for support for multi-codepoint
grapheme clusters like [emoji ZWJ
sequences](https://www.unicode.org/emoji/charts/emoji-zwj-sequences.html)
- Especially on Android, vendors may bundle different fonts. Even "vanilla"
Android may have different fonts from the SDK
([example](https://github.com/amake/isittofu/issues/1))
If you find any inaccuracies, please feel free to [open an
issue](https://github.com/amake/isittofu/issues).