1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-28 19:45:50 +01:00

Bangle.js: Quick tweak to stop us sending bitmaps for common characters that already had good enough equivalents

This commit is contained in:
Gordon Williams 2023-01-11 13:45:46 +00:00
parent 845887ddeb
commit f3fa01dfba

View File

@ -979,6 +979,12 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
boolean needsTranslate = false;
for (int i=0;i<txt.length();i++) {
char ch = txt.charAt(i);
// Special cases where we can just use a built-in character...
// Based on https://op.europa.eu/en/web/eu-vocabularies/formex/physical-specifications/character-encoding
if (ch=='' || ch=='' || ch=='—') ch='-';
else if (ch=='' || ch=='' || ch =='' || ch=='' || ch=='' || ch=='ʹ') ch='\'';
else if (ch=='“' || ch=='”' || ch =='„' || ch=='‟' || ch=='″') ch='"';
// chars which break words up
if (" -_/:.,?!'\"&*()".indexOf(ch)>=0) {
// word split
if (needsTranslate) { // convert word