mathtext SoC update

I'm still alive :wink: Although I still haven't received any

    > payments from Google (they are doing their best to solve
    > this), I've began working on implementing the Knuth's layout
    > algorithms.

OK, but I reiterate my point from my last post on the subject. The
work you have done previously as far as I understand is still not
usable. You need to develop a system wherein mathtext can be used
with a set of unicode fonts, so that when the STYX fonts are released
we can use them. Even if the example font set does not have full
coverage, we need to develop a prototype so that users and developers
can test your work. Something like

  - here are a set of test fonts: http://some.web.site

  - here are the changes you need to make to your rc file

  - here is a test script

I think it is unproductive to move on to new projects before the first
one is completed and usable. Or if am missing something and the work
is usable, please provide a brief set of instructions as above so we
can test it.

JDH

John Hunter wrote:

the STYX fonts are released

did you mean the STIX fonts?

http://www.stixfonts.org/

  - here are a set of test fonts: http://some.web.site

Is that really the link?

···

--
Christopher Barker, Ph.D.
Oceanographer
                                         
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@...236...

"Please repeat after me: I, say your name..."

"I, say your name..."

···

On Wednesday 02 August 2006 11:59, Christopher Barker wrote:

John Hunter wrote:
> the STYX fonts are released

did you mean the STIX fonts?

http://www.stixfonts.org/

> - here are a set of test fonts: http://some.web.site

Is that really the link?

Thanks!
I apologise for keeping the development in obscurity. The procedure
(the best I could come up with):

1) Here are a set of test fonts:
http://download.savannah.gnu.org/releases/freefont/freefont-ttf-20060126.tar.gz

Make sure you extract the files FreeSerif.ttf, FreeMono.ttf to the mpl-data dir.

2) Changes needed to the files: You have to change __init__.py and
mathtext.py (the files are attached) and you also have to add some
lines to matplotlibrc (also attached).
The __init__.py/matplotlibrc changes are trivial:
    # mathtext settings
    'mathtext.unicode' : [False, validate_bool], # Needed to enable Unicode
    # fonts used by mathtext
    'mathtext.rm' : ['FreeSerif.ttf', str], # Roman (normal)
    'mathtext.it' : ['FreeSerif.ttf', str], # Italic
    'mathtext.tt' : ['FreeMono.ttf', str], # Typewriter (monospaced)
    'mathtext.cal' : ['cmsy10.ttf', str], # Caligraphic

Although the default setting for 'mathtext.unicode' is False, the
attached matplotlibrc sets it to True.

The mathtext.py changes are also trivial.

3) mathtext_demo.py will do as a test script. I have added some TeX
symbols to the mathtext_demo.py that is attached with this e-mail.
Note that the attached mathtext_demo.py saves a png, svg and ps file
in the working dir.

Again, I didn't want to commit to the svn, because, as a newbie, I'm
not completely sure if the proposed changes will break something, or
if I should have done things differently.

Any feedback is welcome, only note that the current parsing doesn't
allow some things that in plain TeX you take for granted (I'm
developing a new parser already). The changes only show the current
state of Unicode support in the Font classes.

Cheers
Edin

init.py|attachment (39.7 KB)

mathtext.py (54.3 KB)

matplotlibrc (12.1 KB)

mathtext_demo.py (700 Bytes)

···

On 8/2/06, John Hunter <jdhunter@...5...> wrote:

OK, but I reiterate my point from my last post on the subject. The
work you have done previously as far as I understand is still not
usable. You need to develop a system wherein mathtext can be used
with a set of unicode fonts, so that when the STYX fonts are released
we can use them. Even if the example font set does not have full
coverage, we need to develop a prototype so that users and developers
can test your work. Something like

  - here are a set of test fonts: http://some.web.site

  - here are the changes you need to make to your rc file

  - here is a test script