diff --git a/src/js/jagex2/graphics/PixFont.ts b/src/js/jagex2/graphics/PixFont.ts index 78ee256a..1cdcfe5c 100644 --- a/src/js/jagex2/graphics/PixFont.ts +++ b/src/js/jagex2/graphics/PixFont.ts @@ -11,9 +11,17 @@ export default class PixFont extends Hashable { static readonly CHARCODESET: number[] = []; static { + const isCapacitor: boolean = navigator.userAgent.includes('Capacitor') + for (let i: number = 0; i < 256; i++) { let c: number = PixFont.CHARSET.indexOf(String.fromCharCode(i)); + // This fixes text mangling in Capacitor native builds (Android/IOS) + if (isCapacitor) + if (c >= 63) { // " + c-- + } + if (c === -1) { c = 74; // space }