From bceb7bd1635706ed471faedd11669a2259ac3581 Mon Sep 17 00:00:00 2001 From: Erik Demaine Date: Tue, 13 Feb 2018 23:27:02 -0500 Subject: [PATCH] =?UTF-8?q?Fix=20handling=20of=20Unicode=20characters=20?= =?UTF-8?q?=C3=B0,=20=C3=85,=20=C3=A5=20(#1157)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix double handling of ð (math maps to \eth, not special Unicode character) * Remove Åå special math handling, thanks to #1125 --- src/symbols.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/symbols.js b/src/symbols.js index 8c498fdc..46751db8 100644 --- a/src/symbols.js +++ b/src/symbols.js @@ -267,7 +267,7 @@ defineSymbol(math, ams, textord, "\u29eb", "\\blacklozenge"); defineSymbol(math, ams, textord, "\u2605", "\\bigstar"); defineSymbol(math, ams, textord, "\u2222", "\\sphericalangle", true); defineSymbol(math, ams, textord, "\u2201", "\\complement", true); -// unicode-math maps U+F0 to \matheth. We map to AMS function \eth +// unicode-math maps U+F0 (ð) to \matheth. We map to AMS function \eth defineSymbol(math, ams, textord, "\u00f0", "\\eth", true); defineSymbol(math, ams, textord, "\u2571", "\\diagup"); defineSymbol(math, ams, textord, "\u2572", "\\diagdown"); @@ -739,17 +739,13 @@ for (let i = 0; i < letters.length; i++) { // but they are not actually in the font, nor are they supported by the // Unicode accent mechanism, so they fall back to Times font and look ugly. // TODO(edemaine): Fix this. -const extraLatin = "ÇÐÞçðþ"; +const extraLatin = "ÇÐÞçþ"; for (let i = 0; i < extraLatin.length; i++) { const ch = extraLatin.charAt(i); defineSymbol(math, main, mathord, ch, ch); defineSymbol(text, main, textord, ch, ch); } -const extraLatinMath = "Åå"; -for (let i = 0; i < extraLatinMath.length; i++) { - const ch = extraLatinMath.charAt(i); - defineSymbol(math, main, mathord, ch, ch); -} +defineSymbol(text, main, textord, "ð", "ð"); // Unicode versions of existing characters defineSymbol(text, main, textord, "\u2013", "–");