graphics issues

Thus spake Tim Franklin:

This class is in xml-apis-ext.jar, which had been left out of the
manifest for Vengine.jar.

The build procedure now creates the Class-Path which appears in the
manifest at build-time, which eliminates the last place where anything
related to the class path was being maintained by hand. This should
be the last time we ever have a class path problem.

Thanks. This is not something I would have found on my development
system, because the JARs are already part of the class path for me.

This is fixed in trunk@3280. Try loading some SVG with one of the 3280
builds:

nomic.net/~uckelman/tmp/vassal/


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

See attached for a pic of my directory. Yes, it has a lot of junk in it.

thanks,

Tom

Thus spake “MadDog”:

Ok, I see now. I thought you were doing something like unpacking the
app bundle, which you’re not. Where you put it should be fine.

You’ll want to get svn3282 and try that.

nomic.net/~uckelman/tmp/vass … macosx.dmg


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

OK, 3282 did it. It loads the svg correctly.

Would it be better if I built the module with .png files now, and wait for a final executable later, or just go ahead and incorporate .svg files now ?

thanks,

Mad Dog

OK, we should just rename this forum “Mad Dog is a tard”.

2 more questions:

  1. when using the 3282 build, I can now import SVG files. However, they are not being “rendered” properly within VASSAL. For example, the font changes, and some of the graphic elements have become off center.

  2. In a prototype, I have an “Out of Supply” layer. I want the Out of Supply marker to float over the ground that it is marking (so that if I mouse over the hex the ground unit is in, I see both the ground unit and the Out of Supply marker). All attempts I have tried so far, have the Out of Supply marker effectively replacing the ground unit the marker is sitting on.

thanks,

Mad Dog

Thus spake “MadDog”:

That depends on whether you think it’s worth doing it over again tomorrow.
If no new problems in the next 10 hours or so, I expect we’ll release
3.1.0-beta1 then.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Thus spake “MadDog”:

The font problem is a known issue. You’re using a font which the SVG
renderer doesn’t have access to. You can either (1) convert the glyphs
you’re using into an SVG font, or (2) wait for me to fix it, in 3.2.

As for the other rendering problem you mention, I’d like to see it.
Please upload your module somplace where I can get it (e.g.,
mediafire.com) and I might be able to offer some advice.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

What defines a font as SVG-enabled ? The font in question is Arial-narrow-Italic, and it shows up correctly in the .svg file after saving from AI.

Is there some setting in the AI Save As…svg dialog that can fix this ?

thanks,

Mad Dog

Thus spake “MadDog”:

The reason that the font appears correctly for you in Illustrator is that
Illustrator knows where to find the font on your machine. There is no
such thing as an “SVG-enabled” font. What I mean by an SVG font is a font
which has been converted to SVG in a particular way, as defined here:

w3.org/TR/SVG/fonts.html

Not everyone using your module is guaranteed to have that font, so even if
the renderer could find the font on your machine, that wouldn’t solve the
problem for anyone else.

One way to ensure that a font is available when the SVG is rendered
is to convert the font to SVG. This can be done in one of two ways,
either by converting the text in your counters to paths, or by
converting the font itself to an SVG font using an SVG font converter
like this one

xmlgraphics.apache.org/batik/too … erter.html

and then including the output of that with your counters in the module.
(This might also require small adjustments to the counter SVG in order
to use the SVG font. There might be a way to do the font conversion in
Illustrator, but I can’t say for certain.)

However, an SVG font built from Arial Narrow Italic is not something
you have the legal right to distribute (at least not in the US), since
that would violate your license agreement with Microsoft—so really
your only option here is to convert the text to paths. (This is, BTW,
why I recommend against using proprietary fonts for this sort of thing,
because you can’t redistribute them.)

A second way to ensure that the font is available when the SVG is
rendered is to include the font in the module, but this will only work
once I’ve written the code for it—and wouldn’t be of any help in
your case, since you still don’t have the rights to distribute Arial.

I don’t know, I’ve never used Illustrator.

I think that the simplest way to solve this problem (in the short term)
will be to convert the text to paths. In the long term, we plan to
provide a set of redistributable fonts for use in SVG (and with
GamePieceImages) to address this problem, and a mechanism for embedding
additional fonts in modules.

I still would like to see your module so I can compare the SVG rendering
there with the rendering done by another engine.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

(tinker, tinker, clang, clang, some swearing involved…)

Joel, under the Adobe Illustrator CS3 Save As SVG file dialogs, there is an option to save the text as “Convert to Outline” - as opposed to “Adobe CEF” default. Selecting this seems to clear the problem up. The counter seems to render properly.

thanks,

Tom

Thus spake “MadDog”:

Good, I thought there would be such an option. It’s called “Convert to
Path” in Inkscape, IIRC.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Sigh. Just when I thought it was fixed…

When I add one .svg file (with the save as paths enabled…), it shows up corrupted. I had made the file in AI, then saved it as an .svg.

See the attached file.

Other .svg files work. Is there a size issue ? The SVG file that is causing the problem is 800 pixels wide.

thanks,

Mad Dog

The problem file should look like this in VASSAL.

thanks,

Mad Dog

Thus spake “MadDog”:

I can’t tell what’s wrong from seeing the rendered version. I need the SVG.
Please post the SVG file itself.

ALso, please upload the module somewhere so I can look at the alignment
problem you mentoned earlier.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

I will email it to you. Its only 220K.

The text alignment issues were resolved when I save anything svg with paths enabled.

thanks,

Tom

Alright, I downloaded the 3299 build, and opened up the mod. When I hit the button that brings up the offending SVG file, I get the following error:

The current node (type: 9, name: #document) do not allow children of the given type (type: 3, name: #text)

[ ] Do not show this dialog again

(OK)

When I hit (OK), I get another dialog:

The node (type: 1, name: svg) cannot be inserted, since the document node already has a node of type 1.

[ ] Do not show this dialog again

(OK)

thanks,

Mad Dog

Thus spake “MadDog”:

Thanks.

Ok. You didn’t say they were text alignment problems, just alignment
problems.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)

Sorry for the miscommunication. So far, except for the SVG bug in my map windows, 3299 is working well. Making some great progress !

thanks,

Mad Dog

Joel, did you happen to get the SVG file I sent ? It seems like I can get a different error message every time I open the module and click on one of the buttons that brings up one of the SVG files.

thanks,

Tom

Thus spake “MadDog”:

Yes, but I haven’t had time to examine it yet. My weekend was devoured
by fixing the map snapshot tool.


J.


Messages mailing list
Messages@forums.vassalengine.org
forums.vassalengine.org/mailman/ … engine.org

Post generated using Mail2Forum (mail2forum.com)