From 1d8659586031ec98a733bde94b42e1ca87ddaf0d Mon Sep 17 00:00:00 2001 From: Ratnabali Dutta Date: Mon, 26 Jun 2023 20:24:00 +0530 Subject: [PATCH] Add sorted tex2uni data table --- lib/matplotlib/_mathtext_data.py | 1277 +++++++++++++++--------------- 1 file changed, 644 insertions(+), 633 deletions(-) diff --git a/lib/matplotlib/_mathtext_data.py b/lib/matplotlib/_mathtext_data.py index d37cdff22e57..1a12d1ec08ce 100644 --- a/lib/matplotlib/_mathtext_data.py +++ b/lib/matplotlib/_mathtext_data.py @@ -460,640 +460,651 @@ uni2type1 = {v: k for k, v in type12uni.items()} +# The script below is to sort and format the tex2uni dict + +## For decimal values: int(hex(v), 16) +# newtex = {k: hex(v) for k, v in tex2uni.items()} +# sd = dict(sorted(newtex.items(), key=lambda item: item[0])) +# +## For formatting the sorted dictionary with proper spacing +## the value '24' comes from finding the longest string in +## the newtex keys with len(max(newtex, key=len)) +# for key in sd: +# print("{0:24} : {1: