discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] OpenSCAD text with non latin characters.

A
algotruneman
Sat, Apr 1, 2017 4:27 PM

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

--
View this message in context: http://forum.openscad.org/OpenSCAD-text-with-non-latin-characters-tp9817p21063.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

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> -- View this message in context: http://forum.openscad.org/OpenSCAD-text-with-non-latin-characters-tp9817p21063.html Sent from the OpenSCAD mailing list archive at Nabble.com.
M
MichaelAtOz
Sat, Apr 1, 2017 10:08 PM

Looks like a Linux unique issue.
Alef worked on 2015.03-2,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!

View this message in context: http://forum.openscad.org/OpenSCAD-text-with-non-latin-characters-tp9817p21064.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

Looks like a Linux unique issue. Alef worked on 2015.03-2,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! -- View this message in context: http://forum.openscad.org/OpenSCAD-text-with-non-latin-characters-tp9817p21064.html Sent from the OpenSCAD mailing list archive at Nabble.com.
TP
Torsten Paul
Sun, Apr 2, 2017 4:04 PM

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.

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.
M
MichaelAtOz
Mon, Apr 3, 2017 4:06 AM

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
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!

View this message in context: http://forum.openscad.org/OpenSCAD-text-with-non-latin-characters-tp9817p21067.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

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> 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! -- View this message in context: http://forum.openscad.org/OpenSCAD-text-with-non-latin-characters-tp9817p21067.html Sent from the OpenSCAD mailing list archive at Nabble.com.
AR
Algot Runeman
Mon, Apr 3, 2017 4:38 PM

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.

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.
TP
Torsten Paul
Mon, Apr 3, 2017 7:23 PM

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.

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.
M
MichaelAtOz
Mon, Apr 3, 2017 10:40 PM

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
http://forum.openscad.org/file/n21074/font_list_re_hebrew.png

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.
http://forum.openscad.org/file/n21074/font_list_2_re_hebrew.png

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!

View this message in context: http://forum.openscad.org/OpenSCAD-text-with-non-latin-characters-tp9817p21074.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

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 <http://forum.openscad.org/file/n21074/font_list_re_hebrew.png> 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. <http://forum.openscad.org/file/n21074/font_list_2_re_hebrew.png> 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! -- View this message in context: http://forum.openscad.org/OpenSCAD-text-with-non-latin-characters-tp9817p21074.html Sent from the OpenSCAD mailing list archive at Nabble.com.