Encoding issues in a Text Layer

I’ve got a Text Layer. I’ve got a text with accents. I’ve got a font with accents.

I’ve got a problem too. The image is quite self-explaining:

It seems that the text is encoded as UTF-8 somewhere, but the canvas uses a viewer that assumes the encoding is Latin-1.

How can I fix this mismatch?

Please note that both the Parameters Panel and the floating Text Paragraph window show the “ó” OK. And it doesn’t seem to be a font issue!

you have to define the font used in the “Font Family” parameter. please select a font that includes all the characters in your Text Layer.

As a side notice, the implementation of Text Layer is not very well for use, for example, you can not use a font chooser to define the font family, instead, you need to manually key in the font name. :frowning:

also, if you are still using synfig 1.0.2, you can go to edit–>preferences…–>Render, tick on Use Cairo render on WorkArea option.

I didn’t forget that!

The chars you see in the canvas in the image are from the True Type font I carefully specified among the Text Layer parameters:

aaa.png

The char not represented in the canvas is “ó”.

The font includes “ó”:

bbb.png

The font file is in the same folder that the SIF file is into:

ccc.png

Anyway, everything works fine EXCEPT that non-ASCII char. If you encode “ó” in UTF-8, then decode in Latin-1 (ISO-8859-1, or ISO-8859-15 including “€”), that’s what you get: ó

ddd.png

So that’s very probably what is happening: the canvas is trying to show the text AS IF LATIN-1, but it’s UTF-8 encoded actually. The superscripted three is the char that Intensa Fuente doesn’t include, but I don’t need ³ at all. I need the acute o!

*** How can I make Synfig Studio use UTF-8 when decoding the Text parameter in a Text Layer? ***

This one is a minor inconvenience I can live with. The enconding problem is the one I can’t solve. :frowning:

It’s the last stable version, isn’t it?

Thanks, that makes a difference:

eee.png

The “ó” is then shown. However, the font I chose is lost, some kind of “default font” seems to be used instead…

Can’t I get both in Synfig animations? Spanish non-ASCII chars AND the True Type font I want?

Thanks again.

Moreover, the changes produced by enabling the Cairo-related preference doesn’t affect the final FLV rendering: then, I recover my font election & lose my non-ASCII chars because of the encoding mismatch.

The setting in Preferences… dialog we mentioned in previous post is used in WorkArea only, when you render your sifz document, the render uses the font you defined in Parameters Panel. I have no experienced on Windows platform, on Linux platform, I put the font file in the same folder where my .sifz document, and the corresponding value of Font Family Parameter is ./wqy-microhei.ttc. As you can see, there is not issue on the WorkArea, Preview Window as well as the rendered frame.

So you don´t have any issue, I see. Thanks for documenting your settings & outputs so well.

However, I’m still suffering the same problems:

  • With Cairo rendering:

→ Non-ASCII chars: OK. BUT…

→ Font: A default one that I’m unable to change using the Font Family parameter. I have tried absolute & relative paths, “/” vs "", putting quotes around the value, with & without “.ttf” extension… anything that have come to my mind! BTW, does Cairo need a “.ttc” file? I note your font file is a “collection”, while mine isn’t.

→ Moreover, I’m unable to Render to an FLV file using Cairo.

  • Without Cairo rendering:

→ Font: OK (font file name, without path or extension, as Font Family parameter value). BUT…

→ Non-ASCII chars: NO WAY! Shown as when UTF-8 chars are interpreted without taking into account that encoding.

Which piece of software is the one rendering the text when it’s not Cairo?

Is it the same one for WorkArea, Preview, and Render to an FLV file?

How can I tell it “take UTF-8 into account”?

I’m lost and desperate. I should be writing a document for my pupils to learn Synfig, but I’m unable to even make Synfig work properly.

*** Isn’t anyone else trying to make Synfig animations with Spanish text in them? ***

TIA!

PS: I am using Synfig Studio 1.0.2 on Windows 7.

Has jcome mention earlier the text layer suffer of old implementation and actually is not has useful has other synfig features…

Badly, cairo render is not really an option (no one to maintain the render) and may be drop in next major release (not in 1.0.x series).

So… what’s are the option i will recommend you … hummm…

  1. give English course to your pupils :slight_smile: and no more problem of non ascii char
  2. another font ?
  3. create the image out of synfig and import it has image layer.
  4. time to give an eye to linux :unamused: ???

and all are not very pleasant from a synfig fan point of view… (maybe the first and last one :open_mouth: )

also want to mention that i love the way you have demonstrated the problem with utf

could you, please, report that bug on the bugtracker ?

First things first, thanks for responding, d.j.a.y.

Well, understood.

Thanks, so Cairo is a path that I shouldn’t take.

Yes, we will have to use only English in Text Layers.

But this would solve nothing, it’s not a font issue!

OMG! :frowning:

Really?

They are not going to provide my pupils with a good first impression about Synfig. Especially having into account that I have already written that we need an external program to add sound to the Synfig-generated animation!

Done! http://www.synfig.org/issues/thebuggenie/synfig/issues/938

Hi!
As a work around you can always create the missing letter(s), in this case just the O with the accent, in Inkscape, convert it to paths and export it as sif to be used as a normal vector shape layer in Synfig. It’s just a work around but at least you will be using two open source programs :smiley: .
Greetz!

edit: or even faster: just type a normal “o” and make the accent in synfig. Two seconds of work.

I have tested on a Windows box, I guess it is a Text Layer bug on Windows!

The font family parameter just works by simply keying the font file name, but synfig render on Windows mis-mapping the glyphs i guess.

At this situation, It might be easier that you just convert your text into vector paths in Inkscape, or switch to Linux version of Synfig.

there is not problem on Linux platform as you can see in attached screenshot.

The point for Windows, I guess is to figure how to specify the font file, so that synfig’s render can take it. Did you try an absolute path like: C:\xxx\xxx\xxx\myfont.ttf ? (I have tested, it doesn’t work as expected! :frowning: )

btw, I have tested on develop version of Synfig, both workarea and rendered frame are fine.

Thanks, Darkspace65, but I’m not looking for a workaround for a problem preventing me from getting the animation I really need to produce, my role now is a different one: I have to explain how Synfig works to my pupils. Well, Synfig doesn’t work in this case. It’s a better option in my case just saying: “let’s work in English”.

Thanks!

Thank you very much, Jcome.

So the problem shows in Windows (not in Linux) and not in the develop version (but it does in the last stable AFAIK: 1.0.2).

Anyway, I guess it’s too late for me to change the version for this course, but glad to know that the problem will be probably solved for the next course edition.

Regarding absolute paths, I had already tested them. Not needed without Cairo & not working with Cairo.

Thanks again!

Sorry, I didn’t make it clear. For develop version, I’ve tested on Linux Platform only.

The darkspace workaround is an elegant alternative … and maybe easier that english one … in the same time, computer science is a good reason to improve English skills.

Good work & keep us in touch of your progress and kids creations.

No student creations so far, but you can take a look at my introduction to Synfig (in Spanish) here: http://www3.uji.es/~fprat/synfig/intro/AnimacionSynfig.pdf.

Thanks for your help!

Excelente introducción a Synfig fprat!
-G