[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SVG backend: On-the-fly conversion of Emmentaler/Aybabtu glyphs to p
Re: SVG backend: On-the-fly conversion of Emmentaler/Aybabtu glyphs to paths
Sun, 26 Jul 2009 02:03:55 +0000
On 2009/07/24 23:30:00, Patrick McCarty wrote:
On 2009/07/21 18:43:10, joeneeman wrote:
> I think it would be helpful if you gave an example or 2 of the sort
> you expect to match here. I'm a bit worried also about the fact that
> the attributes to be in a specific order.
The new code uses a generalized regular expression that will match a
element with attributes in any order.
The code is slower now, I think due to the complexity of the new
expression. It might be a better idea if I rewrite this in C++
How slow is it? Are we talking would-be-nice-if-it-were-faster slow or
nobody-will-want-to-use-it slow? The reason I ask is that I think the
_real_ solution would be to use an actual XML parser to parse the whole
svg font and dump all the glyphs into a hash table. As it is, you're
scanning a complicated regexp through the whole font file every time you
want a glyph.
Of course, that's a bunch of work and it involves, for example, deciding
which XML parsing lib to use and whether to use it from C++ and scheme.
So unless it's unusably slow, I'd suggest adding a TODO and committing