]> git.lyx.org Git - lyx.git/commitdiff
Fix encoding for computer modern fonts
authorGeorg Baum <baum@lyx.org>
Sun, 5 Jun 2016 14:53:55 +0000 (16:53 +0200)
committerGeorg Baum <baum@lyx.org>
Sun, 5 Jun 2016 14:53:55 +0000 (16:53 +0200)
The essential hints came from Guillaume amd Jean-Marc at bug #8883.
Tested by comparing the output of

python generate_symbols_list.py `kpsewhich fontmath.ltx`

with lib/symbols.

development/tools/generate_symbols_list.py

index 02482f6d33e0aafa35d9744356d20dc887d40124..d640a6b72961a01ac531ac05f2cddcb97d6a85d6 100755 (executable)
@@ -12,11 +12,15 @@ import sys,string,re,os,os.path
 import io
 
 def get_code(code, font):
-    if font != "dontknowwhichfontusesthisstrangeencoding":
+    # computer modern fonts use a strange encoding
+    cmfonts = ["cmex", "cmr", "cmm", "cmsy"]
+    if font not in cmfonts:
         return code
     if code < 10:
         return code+161
-    elif code < 32:
+    if code < 11:
+        return code+162
+    elif code <= 32:
         return code+163
     else:
         return code