diff --git a/web/source/kmwbase.ts b/web/source/kmwbase.ts index 6cb0407ab2d..b39d99b5b07 100644 --- a/web/source/kmwbase.ts +++ b/web/source/kmwbase.ts @@ -54,9 +54,8 @@ namespace com.keyman { _MasterDocument = null; // Document with controller (to allow iframes to distinguish local/master control) _HotKeys = []; // Array of document-level hotkey objects warned = false; // Warning flag (to prevent multiple warnings) - baseFont = 'sans-serif'; // Default font for mapped input elements - appliedFont = ''; // Chain of fonts to be applied to mapped input elements - fontCheckTimer = null; // Timer for testing loading of embedded fonts + baseFont = 'sans-serif'; // Default page font (utilized by the OSK) + appliedFont = ''; // Chain of fonts to be applied to OSK elements srcPath = ''; // Path to folder containing executing keymanweb script rootPath = ''; // Path to server root protocol = ''; // Protocol used for the KMW script. @@ -113,12 +112,13 @@ namespace com.keyman { getKeyboardPath(f, p?){return f;} KC_(n, ln, Pelem){return '';} handleRotationEvents(){} - // Will serve as an API function for a workaround, in case of future touch-alignment issues. /** + * Legacy API function for touch-alias issue workarounds + * Touch-aliases have been eliminated, though. + * * This function is deprecated in 16.0, with plans for removal in 17.0. */ ['alignInputs'](eleList?: HTMLElement[]){} - hideInputs() {}; namespaceID(Pstub) {}; preserveID(Pk) {}; @@ -232,17 +232,6 @@ namespace com.keyman { return metadata; } - /** - * Expose font testing to allow checking that SpecialOSK or custom font has - * been correctly loaded by browser - * - * @param {string} fName font-family name - * @return {boolean} true if available - **/ - ['isFontAvailable'](fName: string): boolean { - return this.util.checkFont({'family':fName}); - } - /** * Function addEventListener * Scope Public diff --git a/web/source/kmwembedded.ts b/web/source/kmwembedded.ts index 4b1ee767fd7..a27b5abdd37 100644 --- a/web/source/kmwembedded.ts +++ b/web/source/kmwembedded.ts @@ -80,11 +80,6 @@ namespace com.keyman.osk { }; } - VisualKeyboard.prototype.waitForFonts = function(this: VisualKeyboard, kfd, ofd) { - // a dummy function; it's only really used for 'native' KMW. - return true; - } - SuggestionManager.prototype.platformHold = function(this: SuggestionManager, suggestionObj: BannerSuggestion, isCustom: boolean) { // Parallels VisualKeyboard.prototype.touchHold, but for predictive suggestions instead of keystrokes. let suggestionEle = suggestionObj.div; @@ -228,14 +223,6 @@ namespace com.keyman.text { */ keymanweb.domManager._SetTargDir = function(Ptarg){}; - /** - * Align input fields (should not be needed with KMEI, KMEA) - * - * @param {object} eleList A list of specific elements to align. If nil, selects all elements. - * - **/ - keymanweb.alignInputs = function(eleList: HTMLElement[]) {}; - /** * Use rotation events to adjust OSK element positions and scaling if necessary */ diff --git a/web/source/kmwnative.ts b/web/source/kmwnative.ts index 0af29d2ae28..793396e1486 100644 --- a/web/source/kmwnative.ts +++ b/web/source/kmwnative.ts @@ -90,26 +90,6 @@ if(!window['keyman']['initialized']) { return (rx.test(Lfilename) ? '' : keymanweb.options['keyboards']) + Lfilename; } - /** - * Align input fields (should not be needed with KMEI, KMEA), making them visible if previously hidden. - * - * @param {object} eleList A list of specific elements to align. If nil, selects all elements. - * - **/ - keymanweb.alignInputs = function(eleList: HTMLElement[]) { - // no-op - } - - /** - * Programatically hides all input fields with underlying elements. Restore with .alignInputs. - * - * @param {boolean} align align and make visible, else hide - * - **/ - keymanweb.hideInputs = function() { - // no-op. - } - /** * Test if caret position is determined from the active element, or * from the synthesized overlay element (touch devices) diff --git a/web/source/kmwrotation.ts b/web/source/kmwrotation.ts index c098996dea0..1ce4cc636a5 100644 --- a/web/source/kmwrotation.ts +++ b/web/source/kmwrotation.ts @@ -42,8 +42,6 @@ namespace com.keyman { } resolve() { - this.keyman.alignInputs(); - var osk = this.keyman.osk; osk.hideLanguageMenu(); diff --git a/web/source/kmwutils.ts b/web/source/kmwutils.ts index 020d309a5c6..6b7f26f7880 100644 --- a/web/source/kmwutils.ts +++ b/web/source/kmwutils.ts @@ -1021,119 +1021,6 @@ namespace com.keyman { return this.keyman.protocol+'//'+path; } } - - /** - * Return the appropriate test string for a given font - * - * TODO: Tidy up and remove arrays once 'sample' included in font metadata - * - * @param {Object} fd font meta-data object - * @return {string} string to compare width - * - */ - testString(fd): string { - var fontName=fd['family'], - i,s='BESbswy'; - - if('sample' in fd && typeof(fd['sample']) == 'string') { - return s+fd['sample']; - } - - var f=['TamilWeb','TibetanWeb','LatinWeb','CherokeeWeb', - 'EgyptianWeb','SinhalaWeb','KhmerWeb','ArabicWeb', - 'BurmeseWeb','LaoWeb','OriyaWeb','GeezWeb'], - t=['\u0BBE\u0BF5','\u0F7F\u0FD0','\u02B0\u02A4','\u13D0\u13C9', - '\uA723\uF7D3','\u0DD8\u0DA3','\u17D6\u178E','\u0639\u06B3', - '\u1038\u1024','\u0EC0\u0EDD','\u0B03\u0B06','\u1361\u132C']; - - for(i=0; i