0.3 UI Theme, galaxymap & planeview UI

Development of artwork, requests, suggestions, samples, or if you have artwork to offer. Primarily for the artists.
Message
Author
User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re:

#31 Post by Geoff the Medio »

eleazar wrote:I made a set of 5 SVG emblems and 5 background shapes...
FreeOrion can't read SVG files, so unless someone wants to add that capability, we'll need a raster graphic format to get started.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Re:

#32 Post by eleazar »

Geoff the Medio wrote:
eleazar wrote:I made a set of 5 SVG emblems and 5 background shapes...
FreeOrion can't read SVG files, so unless someone wants to add that capability, we'll need a raster graphic format to get started.
Ahh, yes. I was originally under the impression that SVG support was coming soon for FO.

I've uploaded PNG versions in icons/flags/

I still recommend an idiot-proof "everything that's not transparent turns into the primary or secondary empire color.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re:

#33 Post by Geoff the Medio »

eleazar wrote:I made a set of 5 SVG emblems and 5 background shapes, according to the scheme laid out in my previous post. Note, some of the emblem graphics have partially transparent elements. Support for that is not neccesary, but could be interesting.

Get the SVG flag graphics.
I've been playing around with an XML parsing library for unrelated reasons, but since the SVG format is built on XML, I thought I'd try loading up a few SVG images as test input. The library I'm using is TinyXML which is very light-weight, easy to incorporate and relatively simple to use compared to some of the alternatives but it has an unfortunate limitation in its ability to parse <!DOCTYPE entries in XML files.

There are two interfaces for TinyXML, one of which can't handle any <!DOCTYPE tags, and the other which will ignore the tags unless they contain an <!ENTITY tag, in which case it will (sometimes?) crash. This means I can't load any of me SVG test images with the more restrictive interface, but I can load some images using the less restrictive one.

The SVG test images I've used include one linked off the Wikipedia SVG article, and also the emblem03.svg in eleazar's pack of flag parts. The Wikipedia SVG doesn't have any <!ENTITY tags, but does have a <!DOCTYPE tag, so can only be parsed by the less restrictive TinyXML interface. eleazar's SVG has <!ENTITY tags, so fails with both.

Sometimes removing the <!DOCTYPE or <!ENTITY tags fixes the problems with the more restrictive interface, but sometimes it doesn't. The less restrictive interface seems to work with all my tests that don't have those flags (which can be made by removing the flags from an existing SVG file) and in some that do have <!DOCTYPE but no <!ENTITY tags.

So the question I have is, is it difficult or particularly awkward to save SVG files without any <!ENTITY or <!DOCTYPE tags? eleazar's SVG saved with (Adobe?) Illustrator has a large list of <!ENTITY tags in the <!DOCTYPE tag, which makes me worry it'd require a lot of hand-editing to get working.

User avatar
eleazar
Design & Graphics Lead Emeritus
Posts: 3858
Joined: Sat Sep 23, 2006 7:09 pm
Location: USA — midwest

Re: Re:

#34 Post by eleazar »

Geoff the Medio wrote:So the question I have is, is it difficult or particularly awkward to save SVG files without any <!ENTITY or <!DOCTYPE tags? eleazar's SVG saved with (Adobe?) Illustrator has a large list of <!ENTITY tags in the <!DOCTYPE tag, which makes me worry it'd require a lot of hand-editing to get working.
I dunno. As you might expect, Illustrator doesn't give you any options related to these tags, but another program might not use these tags, or have different save modes. I've been meaning to check out what the other vector programs are like, if i do, i'll check the files for these tags.

Post Reply