svg fonts and mathtext

Paul Kienzle wrote:
>> Paul Kienzle wrote:
> Note: Adobe SVGViewer doesn't see the embedded fonts, but it works if I
> have the fonts installed. Oh, well!

With the embedded fonts, you mean the text just doesn't show up at all?

It looks the same as the version without embedded fonts, which is that it
chooses some incorrect default font with the wrong character codes as I
showed earlier.

I thought unicode was supposed to give unique codes to the characters
so that even if the font was wrong, at least you would get the correct
glyph from the font. Or does this only happen at a higher level?

  Do you know if the SVG output from Cairo works with Adobe? They use a
similar (but not identical) approach to embedding the character outlines.

I'm not set up to run Cairo, but I can check if someone sends me an svg.

  - Paul

···

On Fri, Sep 07, 2007 at 03:09:10PM -0400, Michael Droettboom wrote:

> On Fri, Sep 07, 2007 at 12:09:01PM -0400, Michael Droettboom wrote:

Maybe I’m doing something wrong, but is there support for \AA {the angstrom} symbol within mathtext for any of the backends? If not, would it be difficult to add?

Thanks,
William

···

On 9/7/07, Paul Kienzle <pkienzle@…537…> wrote:

On Fri, Sep 07, 2007 at 03:09:10PM -0400, Michael Droettboom wrote:

Paul Kienzle wrote:

On Fri, Sep 07, 2007 at 12:09:01PM -0400, Michael Droettboom wrote:

Paul Kienzle wrote:
Note: Adobe SVGViewer doesn’t see the embedded fonts, but it works if I

have the fonts installed. Oh, well!

With the embedded fonts, you mean the text just doesn’t show up at all?

It looks the same as the version without embedded fonts, which is that it

chooses some incorrect default font with the wrong character codes as I
showed earlier.

I thought unicode was supposed to give unique codes to the characters
so that even if the font was wrong, at least you would get the correct

glyph from the font. Or does this only happen at a higher level?

Do you know if the SVG output from Cairo works with Adobe? They use a
similar (but not identical) approach to embedding the character outlines.

I’m not set up to run Cairo, but I can check if someone sends me an svg.

    - Paul

This SF.net email is sponsored by: Splunk Inc.

Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>
http://get.splunk.com/


Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

\angstrom also does not work.

Thanks,
William

···

On 9/7/07, william ratcliff <william.ratcliff@…149… > wrote:

Maybe I’m doing something wrong, but is there support for \AA {the angstrom} symbol within mathtext for any of the backends? If not, would it be difficult to add?

Thanks,
William

On 9/7/07, Paul Kienzle <pkienzle@…537…> wrote:

On Fri, Sep 07, 2007 at 03:09:10PM -0400, Michael Droettboom wrote:

Paul Kienzle wrote:

On Fri, Sep 07, 2007 at 12:09:01PM -0400, Michael Droettboom wrote:

Paul Kienzle wrote:
Note: Adobe SVGViewer doesn’t see the embedded fonts, but it works if I

have the fonts installed. Oh, well!

With the embedded fonts, you mean the text just doesn’t show up at all?

It looks the same as the version without embedded fonts, which is that it

chooses some incorrect default font with the wrong character codes as I
showed earlier.

I thought unicode was supposed to give unique codes to the characters
so that even if the font was wrong, at least you would get the correct

glyph from the font. Or does this only happen at a higher level?

Do you know if the SVG output from Cairo works with Adobe? They use a
similar (but not identical) approach to embedding the character outlines.

I’m not set up to run Cairo, but I can check if someone sends me an svg.

    - Paul

This SF.net email is sponsored by: Splunk Inc.

Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> [

http://get.splunk.com/](http://get.splunk.com/)


Matplotlib-devel mailing list

Matplotlib-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Sorry -- that used to work, but fell through the cracks in the recent mathtext rewrite. It shouldn't be difficult to add back in. I'll let you know when that's done.

Cheers,
Mike

william ratcliff wrote:

···

Maybe I'm doing something wrong, but is there support for \AA {the angstrom} symbol within mathtext for any of the backends? If not, would it be difficult to add?

Thanks,
William

On 9/7/07, *Paul Kienzle* <pkienzle@...537... <mailto:pkienzle@…537…>> > wrote:

    On Fri, Sep 07, 2007 at 03:09:10PM -0400, Michael Droettboom wrote:
     > Paul Kienzle wrote:
     > > On Fri, Sep 07, 2007 at 12:09:01PM -0400, Michael Droettboom wrote:
     > >> Paul Kienzle wrote:
     > > Note: Adobe SVGViewer doesn't see the embedded fonts, but it
    works if I
     > > have the fonts installed. Oh, well!
     >
     > With the embedded fonts, you mean the text just doesn't show up
    at all?

    It looks the same as the version without embedded fonts, which is
    that it
    chooses some incorrect default font with the wrong character codes as I
    showed earlier.

    I thought unicode was supposed to give unique codes to the characters
    so that even if the font was wrong, at least you would get the correct
    glyph from the font. Or does this only happen at a higher level?

     > Do you know if the SVG output from Cairo works with
    Adobe? They use a
     > similar (but not identical) approach to embedding the character
    outlines.

    I'm not set up to run Cairo, but I can check if someone sends me an svg.

            - Paul

    -------------------------------------------------------------------------
    This SF.net email is sponsored by: Splunk Inc.
    Still grepping through log files to find problems? Stop.
    Now Search log events and configuration files using AJAX and a browser.
    Download your FREE copy of Splunk now >> http://get.splunk.com/
    _______________________________________________
    Matplotlib-devel mailing list
    Matplotlib-devel@lists.sourceforge.net
    <mailto:Matplotlib-devel@lists.sourceforge.net>
    matplotlib-devel List Signup and Options

--
Michael Droettboom
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

Paul Kienzle wrote:

Paul Kienzle wrote:

Paul Kienzle wrote:

Note: Adobe SVGViewer doesn't see the embedded fonts, but it works if I
have the fonts installed. Oh, well!

With the embedded fonts, you mean the text just doesn't show up at all?

It looks the same as the version without embedded fonts, which is that it
chooses some incorrect default font with the wrong character codes as I
showed earlier.

That's very surprising, since when the characters are embedded, there's no notion of characters (<text> elements) in the file at all -- it just uses references to paths in the file that have non-meaningful names like c_a2.

I thought unicode was supposed to give unique codes to the characters
so that even if the font was wrong, at least you would get the correct
glyph from the font. Or does this only happen at a higher level?

Unfortunately, the Bakoma fonts (Truetype conversions of TeX fonts) are not encoded in Unicode. They're in an encoding that closely resembles the somewhat arbitrary encoding that was used to design the original fonts (that pre-dates Unicode). Unless we were to remap those fonts to Unicode, we have to suffer along with the encoding they have. I've been playing with ways to rebuild the fonts, but nothing has come up very satisfactory. Long term, hopefully by the time I retire, the Stix fonts will be available and we can go over to Unicode whole-hog.

  Do you know if the SVG output from Cairo works with Adobe? They use a similar (but not identical) approach to embedding the character outlines.

I'm not set up to run Cairo, but I can check if someone sends me an svg.

Attached (gzipped).

mathtext_demo_cairo.svg.gz (17.1 KB)

···

On Fri, Sep 07, 2007 at 03:09:10PM -0400, Michael Droettboom wrote:

On Fri, Sep 07, 2007 at 12:09:01PM -0400, Michael Droettboom wrote:

--
Michael Droettboom
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

It may be a hassle, but perhaps you could allow
\AA and \angstrom to both represent angstrom.

Thanks!!!

William

···

On 9/7/07, Michael Droettboom <mdroe@…31…> wrote:

Sorry – that used to work, but fell through the cracks in the recent

mathtext rewrite. It shouldn’t be difficult to add back in. I’ll let
you know when that’s done.

Cheers,
Mike

william ratcliff wrote:

Maybe I’m doing something wrong, but is there support for \AA {the

angstrom} symbol within mathtext for any of the backends? If not, would
it be difficult to add?

Thanks,
William

On 9/7/07, Paul Kienzle < > pkienzle@…537… mailto:pkienzle@...537...> > > wrote:

On Fri, Sep 07, 2007 at 03:09:10PM -0400, Michael Droettboom wrote:
 > Paul Kienzle wrote:
 > > On Fri, Sep 07, 2007 at 12:09:01PM -0400, Michael Droettboom wrote:
 > >> Paul Kienzle wrote:
 > > Note: Adobe SVGViewer doesn't see the embedded fonts, but it
works if I
 > > have the fonts installed.  Oh, well!
 >
 > With the embedded fonts, you mean the text just doesn't show up
at all?

It looks the same as the version without embedded fonts, which is
that it
chooses some incorrect default font with the wrong character codes as I
showed earlier.

I thought unicode was supposed to give unique codes to the characters
so that even if the font was wrong, at least you would get the correct
glyph from the font.  Or does this only happen at a higher level?

 >   Do you know if the SVG output from Cairo works with
Adobe?  They use a
 > similar (but not identical) approach to embedding the character
outlines.

I'm not set up to run Cairo, but I can check if someone sends me an svg.
        - Paul

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>   [http://get.splunk.com/](http://get.splunk.com/)
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
<mailto:

Matplotlib-devel@lists.sourceforge.net>

[https://lists.sourceforge.net/lists/listinfo/matplotlib-devel](https://lists.sourceforge.net/lists/listinfo/matplotlib-devel)

Michael Droettboom
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA

As of r3815, you can do \AA in a mathtext expression.

It would be very easy to support both \angstrom and \AA, but in the interests of trying to be as LaTeX-like as possible, I think we should just do \AA, though IMHO \angstrom is easier to remember. I couldn't find references anywhere to \angstrom being a real command in LaTeX (and it doesn't work by default on my LaTeX installation when I tried it.) But I may just not be Googling right. If you can find a reference, I'm happy to make the one-line change to support it.

Cheers,
Mike

william ratcliff wrote:

···

It may be a hassle, but perhaps you could allow
\AA and \angstrom to both represent angstrom.

Thanks!!!

William

On 9/7/07, *Michael Droettboom * <mdroe@...31... > <mailto:mdroe@…31…>> wrote:

    Sorry -- that used to work, but fell through the cracks in the recent
    mathtext rewrite. It shouldn't be difficult to add back in. I'll let
    you know when that's done.

    Cheers,
    Mike

    william ratcliff wrote:
     > Maybe I'm doing something wrong, but is there support for \AA {the
     > angstrom} symbol within mathtext for any of the backends? If
    not, would
     > it be difficult to add?
     >
     > Thanks,
     > William
     >
     > On 9/7/07, *Paul Kienzle* < pkienzle@...537... > <mailto:pkienzle@…537…> <mailto:pkienzle@…537… > <mailto:pkienzle@…537…>>> > > wrote:
     >
     > On Fri, Sep 07, 2007 at 03:09:10PM -0400, Michael Droettboom > wrote:
     > > Paul Kienzle wrote:
     > > > On Fri, Sep 07, 2007 at 12:09:01PM -0400, Michael > Droettboom wrote:
     > > >> Paul Kienzle wrote:
     > > > Note: Adobe SVGViewer doesn't see the embedded fonts,
    but it
     > works if I
     > > > have the fonts installed. Oh, well!
     > >
     > > With the embedded fonts, you mean the text just doesn't
    show up
     > at all?
     >
     > It looks the same as the version without embedded fonts,
    which is
     > that it
     > chooses some incorrect default font with the wrong character
    codes as I
     > showed earlier.
     >
     > I thought unicode was supposed to give unique codes to the
    characters
     > so that even if the font was wrong, at least you would get
    the correct
     > glyph from the font. Or does this only happen at a higher level?
     >
     > > Do you know if the SVG output from Cairo works with
     > Adobe? They use a
     > > similar (but not identical) approach to embedding the
    character
     > outlines.
     >
     > I'm not set up to run Cairo, but I can check if someone sends
    me an svg.
     >
     > - Paul
     >
     > -------------------------------------------------------------------------
     > This SF.net email is sponsored by: Splunk Inc.
     > Still grepping through log files to find problems? Stop.
     > Now Search log events and configuration files using AJAX and
    a browser.
     > Download your FREE copy of Splunk now >> http://get.splunk.com/
     > _______________________________________________
     > Matplotlib-devel mailing list
     > Matplotlib-devel@lists.sourceforge.net
    <mailto:Matplotlib-devel@lists.sourceforge.net>
     > <mailto: Matplotlib-devel@lists.sourceforge.net
    <mailto:Matplotlib-devel@lists.sourceforge.net>>
     > matplotlib-devel List Signup and Options
     >

    -- Michael Droettboom
    Operations and Engineering Division
    Space Telescope Science Institute
    Operated by AURA for NASA

--
Michael Droettboom
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA