Expanded NATO symbol options

Thus spake “Brent Easton”:

Yes, so long as we have a mechanism for embedding fonts.


J.


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

Post generated using Mail2Forum (mail2forum.com)

If you use the same font, the results will be identical (e.g., in acrobat reader). The differences you see are the result of font substitutions which you often see in OpenOffice on Linux because Linux rarely has proprietary fonts. Helvetica will often be substituted with Arial; Times will often be replaced by Times New Roman – or they’ll get replaced by even freer fonts like the Nimbus series. But the same font will always produce the same results. So if a font is included with a module, it will look the same.

However, it occurs to me that straight SVG may be better than using fonts for NATO symbols. The reason is that fonts don’t scale asymmetrically very well and users may not want the default proportions. The question I have is regarding SVG rendering in Java: does it align vertical and horizontal lines on pixel columns or rows, respectively? For example, PostScript does do that. Also, if you scale SVGs, can you scale stroke width independently?

I’m leaning toward basic SVG.

  • M.

2009/1/9 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

The SVG standard supports supports aligning vertical and horizontal lines
with the pixel grid via the “crispEdges” value of the shape-rendering
attribute. I’m not sure about independent scaling for stroke width—Inkscape
supports that, e.g., but I’m not sure about whether there’s language support
for it. (I think doing that would look bad for most tokens.)


J.


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

Post generated using Mail2Forum (mail2forum.com)

You wouldn’t want vertical & horizontal line widths to scale differently.

  • M.

On 10/01/2009, Joel Uckelman uckelman@nomic.net wrote:


Michael Kiefte, Ph.D.
Associate Professor
School of Human Communication Disorders
Dalhousie University
Halifax, Nova Scotia, Canada
tel: +1 902 494 5150
fax: +1 902 494 5151


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

Huh? I don’t follow. I thought you were talking about stroke widths scaling
independently of the overall transform (e.g., for maintaining a 1px border
at any size).


J.


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

Post generated using Mail2Forum (mail2forum.com)

I am talking about stroke widths scaling independently. What I mean is, if you scale the width independently of the height, would be able to ensure that horizontal stroke width does not scale independently of vertical stroke width. For that to be the case, stroke width would have to be independent of scaling. Right now, an infantry symbol can have whatever proportions the users want and the stroke width is independent of that.

  • M.

2009/1/10 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

The concept you’re talking about—stroke height—doesn’t exist in SVG.
A stroke is a path, and paths only have width. The width of a path is
tangentially perpendicular to its direction at each point along the path.

Why would you want to change the aspect ratio of an infantry symbol, anyway?


J.


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

Post generated using Mail2Forum (mail2forum.com)

That’s what I was referring to. I think you answered my question. It’s a question of whether scaling occurs before or after stroking. If scaling occurs after, you’d get very strange effects.

Different games have different aspect ratios. The way it works now, you can have whatever aspect ratio you want.

E.g., according to the NATO document, neutral infantry symbols are square. Of course, enemy units are diamonds…

  • M.

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

Most likely only the friendly symbols are ever going to be used, as you
probably want the symbols to be relative to the units’ owner.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Still, you want to be able to offer different aspect ratios.

You know, there’s nothing really wrong with the Java2D approach. Can’t they just produce SVGs instead of PNGs?

  • M.

2009/1/10 Joel Uckelman <uckelman@nomic.net (uckelman@nomic.net)>

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Michael Kiefte”:

It could, yes, but having a NATO SVG symbols set would also be useful for
creating pieces by hand and with scripts, as well as from within VASSAL.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Fair enough. I’ll skip some of the more obscure symbols in this format.

A full set of GPL symbols would be handy to have, I think, but may be beyond the scope of this specific use. Possible spinoff? Has anyone spoken to the mapsymbs guy about changing his license?

In an ideal world. I can state positively that in the context of this EXACT issue I have that NOT to be the case. I did a whole thread asking Joel for help because my text labels set up as rendered on a Windows machine came out all messed up on a linux machine - same module, same font. That turned out to be an oddity with a particular charset on ubuntu on openjdk (all three of those required to produce it), and it was a difference in the way the font was located relative to its anchor not in appearance per se.
But… as much as I would like it to be so… I think it is not a safe assumption to believe that all fonts will render identically between different OS’s or even JRE versions or even charsets within a JRE version.

Me, I would like to see more font capability though. Right now if I recall you are restricted to about three or four selections for a text label. I would like to be able to do things like have Greek alphabet lettering on my Macedonian army etc. Without having to endure the pain of building it offline graphically, which I know is the favored approach right now. But lets not get off track here.

Thus spake “IrishBouzouki”:

The issue you’re referring to is due to a bug. If we’re going to consider
bugs when comparing rendering, then we can’t provide you with any guarantees
that images will render the same on different platforms, either—Brent’s
computer is an example of that, since images don’t render to screen properly
for him when using Direct3D.

In the absence of that particular bug, you should see the same fonts
rendering the same way on differnet platforms.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Early testing of Game Piece Images indicated this just doesn’t happen unless the font is transferred with the module. Java defines 5 ‘standard’ fonts that are available on all systems. These fonts render differently on different systems.

B.


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

Post generated using Mail2Forum (mail2forum.com)

Thus spake “Brent Easton”:

What I’m talking about is in the context of using the same font—as in,
bitwise identical—on different platforms. One way to do that is to ship
the font inside the module.


J.


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

Post generated using Mail2Forum (mail2forum.com)

Yes, that will be the only way.

Which will be painful respect of GamePieceImages as you have the option to use any fonts installed on your system. Any fonts you choose to use will have to be located and copied into the module.

B.


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

Post generated using Mail2Forum (mail2forum.com)

I think we went over this somewhere before :slight_smile:

Post generated using Mail2Forum (mail2forum.com)

2009/1/11 Brent Easton <b.easton@exemail.com.au (b.easton@exemail.com.au)>

That’s because they’re actually different fonts. Java defines 5 generic names along the lines of “Serif”, “Sans”, or whatever. What they really come out as could be anything – including something else entirely. The ADC2 importer technically relies on the presence of several fonts which are not present on Linux so you’re maps are never going to be exactly the same under VASSAL as ADC2 (they’re not anyway–they’re better).

There’s actually not that many “safe” fonts. I can’t think of one that’s guaranteed to be on all platforms. However, you can freely download what Microsoft calls core web fonts, although, technically, they’re iffy too, and you can’t legally get away with packaging them with a module either.

  • M.

Post generated using Mail2Forum (mail2forum.com)

All bets are off with OpenGL. I think there are some constraints, but I don’t think there are any places were you’re guaranteed a pixel-by-pixel identity across video cards. Your recent experience with JOGL is an extreme example!

But it’s close enough (except for you, Joel).

  • M.

Post generated using Mail2Forum (mail2forum.com)