Wrapping SVGSalamander is great, I look forward to that feature! Yes, there are plenty of music notation fonts. However, there are many more music symbols than they support plus many new types of music notation systems proposed by an expert group, so I needed a way to implement all these possible symbols in an open-ended way. The solution was webfonts which I or users can now produce using any vector graphic app that supports SVG. There is also a TT Font to webfont converter we built which is useful.
What we do is use SVGSalamander to parse the SVG webfont then render the glyphs in the webfont to images. This prepares the symbols in advance by pre-rendering them at a given size, color and hints including graphic effects. Then to render the symbol images a Graphics2D and XY location need to be specified. If the score surface is a StackPane I would expect to be able to target a given layer Panel by passing a specific Panel's Graphic2D to the symbol render method, right? Superstring On 2010-09-27, at 7:24 AM, Greg Brown wrote: > I thought the idea of wrapping SVGSalamander would work well. Any reason not > to pursue that? > > Are there fonts that support musical notation? That might render more > efficiently than something defined in SVG. > > On Sep 27, 2010, at 3:46 AM, Superstring Media wrote: > >> There was a "batik-pivot.zip" posted in "Pivot SVG Integration" and it uses >> a lot of Batik dependencies. Batik is large and if Pivot already has a >> drawing API and a interactive DOM along with XML parsing then using Batik >> may be overkill. >> >> In my own project prior to knowing about Pivot SVGSalamander was used, but >> mostly because of the XML processing it already could do plus the >> translation of SVG paths into Java2D it did. Maybe most of the similar >> requirements are already present in Pivot? >> >> In another SVG to Java2D project called the SVG Shape Extractor Batik was >> also used, however it used a greatly reduced version and called it >> "batik-cutdown.jar". Here is a link to that project: >> >> http://www.jasperpotts.com/blog/2007/07/svg-shape-2-java2d-code/ >> >> Where SVG is most useful is in importing artwork from vector graphic apps. >> If the artwork can be converted into a Pivot drawing that would be useful. >> In my project we went further and converted SVG Webfont glyphs into images >> so that they could be rendered with the greatest possible speed. Because the >> glyphs in my case are music notation symbols I was not as inclined to want >> to use a scenegraph of nodes because there would be performance issues if to >> many music glyphs were rendered. >> >> Superstring >
