Quantcast

OpenSCAD text with non latin characters.

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OpenSCAD text with non latin characters.

Jaacov Molcho
Can any one help me to write text with non Latin characters.
Attached is screen shot of my attempt to use Hebrew characters.
J. Molcho.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566

Hebrew text for OPENscad.jpg (133K) Download Attachment
tp3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

tp3
Jaacov Molcho wrote
Can any one help me to write text with non Latin characters.Attached is screen shot of my attempt to use Hebrew characters.J. Molcho.
Is that font freely available, so I can have a look at the font file? The problem might be caused by the font using a Windows specific encoding. There's a special workaround for Windows symbol fonts, but otherwise OpenSCAD will only work reliable with fonts that have a unicode codepage.
-- Torsten
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

Scalpel78
This post has NOT been accepted by the mailing list yet.
Hi guys, here is a similar problem with certain characters.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

Bananapeel
I think this is caused by a problem with the source file encoding, and OpenSCAD's interpretation of it. Using in the unicode escape codes makes the characters appear correctly.

text("\u00E6");

Hope this helps,
Bananapeel :)
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

algotruneman
On my Ubuntu install, OpenSCAD version 2015.03-1, Hebrew characters do not show unless I specify another font, not the built-in Liberation Sans. In my case, I tried Arial and was able to get the several Hebrew letters I tried including,  \u05d0 for "alef"
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

MichaelAtOz
Administrator
This post was updated on .
Looks like a Linux unique issue.
Alef worked on 2015.03-1,03-2, 2017.01.20 on Windows-7.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
tp3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

tp3
In reply to this post by algotruneman
On 04/01/2017 06:27 PM, algotruneman wrote:
> On my Ubuntu install, OpenSCAD version 2015.03-1, Hebrew characters do not
> show unless I specify another font, not the built-in Liberation Sans. In my
> case, I tried Arial and was able to get the several Hebrew letters I tried
> including,  \u05d0 for "alef"
>   <http://forum.openscad.org/file/n21063/alef.png>
>
OpenSCAD does not do any font or glyph substitution, so you will get
what the specified font (or to be precise the one selected by fontconfig)
has, which can be some dummy glyph if the font does not support a given
codepoint.

There are not many fonts that have good support for lots of different
languages/scripts. In some cases special font files are provided that
cover various sections of the unicode pages.

ciao,
  Torsten.



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

MichaelAtOz
Administrator
In reply to this post by algotruneman
algotruneman wrote
On my Ubuntu install, OpenSCAD version 2015.03-1, Hebrew characters do not show unless I specify another font, not the built-in Liberation Sans. In my case, I tried Arial and was able to get the several Hebrew letters I tried including,  \u05d0 for "alef"
 
With Liberation Sans, did you just use text() without specifying a font/style, ie defaulted, or did you explicitly specify it?
What happens if you do/don't?
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

algotruneman
On 04/03/2017 12:06 AM, MichaelAtOz wrote:
<http://forum.openscad.org/file/n21063/alef.png> 
With Liberation Sans, did you just use text() without specifying a
font/style, ie defaulted, or did you explicitly specify it?
What happens if you do/don't?

Michael,

Just tested:

text("\u05d0"); - Produces a rectangular box character substitute.
text("\u05d0",font="Liberation Sans"); - Produces a rectangular box character substitute.

text("\u05d0",font="sans-serif"); - Produces the alef character -  א

text("\u05d0",font="Arial"); - produces the alef as I mentioned in an earlier post to this thread.

The system font (in my Kubuntu 16.10) is Noto Sans. If I try Noto Sans in OpenSCAD, I get a wider generic box character substitute, not the same one as when I specify Liberation Sans.

Specifying Liberation Sans in LibreOffice or in Inkscape DOES produce the alef. I do not know if OpenSCAD is using "my" installed Liberation Sans or its own. The reading I did in the manual suggested that a version of Liberation Sans is built into OpenSCAD to avoid problems.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
tp3
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

tp3
On 04/03/2017 06:38 PM, Algot Runeman wrote:
> Specifying Liberation Sans in LibreOffice or in Inkscape DOES produce
> the alef. I do not know if OpenSCAD is using "my" installed Liberation
> Sans or its own. The reading I did in the manual suggested that a
> version of Liberation Sans is built into OpenSCAD to avoid problems.
>
While there is a possibility that there are different fonts, it's more
likely that the mentioned font substitution is going on. It certainly
is on my system (Debian / Testing).

If I select Liberation Sans as font and start typing something like
"Test" and then continue with <CTRL+SHIFT+u>5d0<RETURN> to input that
unicode character, the font box switches to FreeSans temporarily for
this character because it's not available in Liberation Sans.

ciao,
  Torsten.

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenSCAD text with non latin characters.

MichaelAtOz
Administrator
a. Try text("\u05d0",font="Liberation Sans:style=Regular"); (Prob. wont work...)

b. Have a look at Help/Font_List, I seem to have two Liberations


With Windows tools I am unable to see them individually so don't know which is used.
So I deleted the Windows one, then the Hebrew still worked in OpenSCAD.


I'm not a Linux font guru, so can't help further, but it seems the included font does have Hebrew.
So you need to investigate other Liberations installed.
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Loading...