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
of string
> you expect to match here. I'm a bit worried also about the fact that
you
require > the attributes to be in a specific order.
The new code uses a generalized regular expression that will match a
<glyph>
element with attributes in any order.
The code is slower now, I think due to the complexity of the new
regular
expression. It might be a better idea if I rewrite this in C++
eventually. 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 this patch. http://codereview.appspot.com/96083 _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel