mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 20:36:51 +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:
parent
845887ddeb
commit
f3fa01dfba
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user