Skip to content

Commit 3bccb55

Browse files
committed
inline _is_digit, etc.
1 parent 28b5cb8 commit 3bccb55

File tree

1 file changed

+15
-20
lines changed

1 file changed

+15
-20
lines changed

lib/matplotlib/_mathtext.py

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -747,26 +747,6 @@ class DejaVuSansFonts(DejaVuFonts):
747747
}
748748

749749

750-
def _is_digit(codepoint):
751-
return 0x30 <= codepoint <= 0x39
752-
753-
754-
def _is_latin_uppercase(codepoint):
755-
return 0x41 <= codepoint <= 0x5a
756-
757-
758-
def _is_latin_lowercase(codepoint):
759-
return 0x61 <= codepoint <= 0x7a
760-
761-
762-
def _is_greek_uppercase(codepoint):
763-
return codepoint in greek_uppercase_domain
764-
765-
766-
def _is_greek_lowercase(codepoint):
767-
return codepoint in greek_lowercase_domain
768-
769-
770750
class UnicodeMathFonts(TruetypeFonts):
771751
"""
772752
A font handling class for unicode mathematics fonts.
@@ -819,6 +799,21 @@ def _get_glyph(self, fontname: str, font_class: str,
819799
# from here on: use the Math font
820800
new_fontname = 'mathfont'
821801

802+
def _is_digit(codepoint):
803+
return 0x30 <= codepoint <= 0x39
804+
805+
def _is_latin_uppercase(codepoint):
806+
return 0x41 <= codepoint <= 0x5a
807+
808+
def _is_latin_lowercase(codepoint):
809+
return 0x61 <= codepoint <= 0x7a
810+
811+
def _is_greek_uppercase(codepoint):
812+
return codepoint in greek_uppercase_domain
813+
814+
def _is_greek_lowercase(codepoint):
815+
return codepoint in greek_lowercase_domain
816+
822817
# check if character is digit, latin letter, or greek letter
823818
if _is_digit(uniindex):
824819
# handle digits

0 commit comments

Comments
 (0)