>>>>> "steve" == steve schmerler <mefx@...> writes:
steve> No, all capital greek letters are upright.
This looks like a mathtext bug then. To fix it, you need to update
the entries in _mathtext_data.py. In that file there is a dictionary
mapping symbol names to fontnames, glyphindex, eg for \Omega
r'\Omega' : ('cmmi10', 23),
as you can see, we are pulling it from the italics file. What you
need to do is find out which cm* font file contains the Omega you
want, and what the glyph index of Omega is. There is a comment in the
_mathtext_data file that gives some guidance, namely
# this dict maps symbol names to fontnames, glyphindex. To get the
# glyph index from the character code, you have to use a reverse
# dictionary grom font.get_charmaps, eg,
from matplotlib.ft2font import FT2Font
font = FT2Font('/usr/lib/python2.4/site-packages/matplotlib/mpl-data/cmr10.ttf')
codes = font.get_charmap().items()
rd = dict([(charcode, glyphind) for glyphind,charcode in codes])
items = rd.items()
for charcode, glyphind in items:
print charcode, glyphind
So if you know the character code of the glyph you want, you can use
this code to get the right glyph index.
If you would like to take a stab at fixing these for the upper case
greek letters, that would be great.