Page 1 of 2
Support for Hebrew fonts (.shx)
Posted: Sun Jul 04, 2021 1:17 pm
by shim
Hi,
My OS: Linux s-Aspire-7750 5.4.0-77-generic #86~18.04.1-Ubuntu x86_64 GNU/Linux
I have a drawing that contains Hebrew text. I added Hebrew .shx fonts to the 'fonts' folder (as I would in Autocad) so that QCAD would display Hebrew characters. Even so (after restart) QCAD displays only the equivalent (and meaningless) Latin characters. See encircled text:

- Screenshot_2021-07-04_14-50-41.png (27.42 KiB) Viewed 19819 times
It seems also (according to the dropdown font menu) that QCAD isn't even aware of the newly added fonts.
Is there a known solution for this?
Re: Support for Hebrew fonts (.shx)
Posted: Sun Jul 04, 2021 4:13 pm
by CVH
Hi,
I think that QCAD works with TTF fonts.
And then again the text doesn't rely on Hebrew.shx
All text based entities rely on "Miriam CLM".
That can be found here:
https://fontinfo.opensuse.org/fonts/MiriamCLMBook.html
Linked to a basic collection of Hebrew fonts for X Windows is found here:
http://culmus.sourceforge.net/
Regards,
CVH
Re: Support for Hebrew fonts (.shx)
Posted: Mon Jul 05, 2021 11:09 am
by shim
The TTF fonts are already detected by QCAD and the selected font is Miriam CLM. For the text to display properly I need miriam.shx loaded, something which isn't happening even after I've copied about 100 .shx font files into the folder.
Re: Support for Hebrew fonts (.shx)
Posted: Mon Jul 05, 2021 11:41 am
by andrew
QCAD does not support SHX fonts.
You might want to substitute those fonts with a TTF font (automatically with Edit > Substitute Fonts).
Re: Support for Hebrew fonts (.shx)
Posted: Mon Jul 05, 2021 12:00 pm
by shim
Nope. Doesn't work. The text is still displayed In Latin characters. On Autocad (and Draftsight for that matter) I would just copy *.shx font files into the 'fonts' folder, restart, and text displays automatically. QCAD in this case doesn't even detect the existence of these fonts even after I've copied them into the 'fonts' folder under ~/user/opt/QCAD/fonts (fonts are also installed system-wide in /usr/share/fonts)
Re: Support for Hebrew fonts (.shx)
Posted: Mon Jul 05, 2021 3:46 pm
by CVH
andrew wrote: ↑Mon Jul 05, 2021 11:41 am
QCAD does not support SHX fonts.
SHX files are 'AutoCAD Compiled Shape File' intended for ACAD software or compatible.
QCAD supports TTF fonts.
A Miriam CLM TTF is available, simply install that.
Regards,
CVH
Re: Support for Hebrew fonts (.shx)
Posted: Mon Jul 05, 2021 6:45 pm
by shim
I think I'm not being clear: I have Miriam CLM fonts installed already system wide. Additionally, I have Miriam CLM fonts installed in the QCAD 'fonts' folder:

- Screenshot_2021-07-05_20-28-32.png (49 KiB) Viewed 19749 times
Miriam CLM is designated as substitute font as well:

- Screenshot_2021-07-05_20-32-28.png (46.41 KiB) Viewed 19749 times
Still text is in meaningless Latin characters (notice how MIriam CLM is the designated font):

- Screenshot_2021-07-05_20-34-25.png (48.96 KiB) Viewed 19749 times
What am I not doing right?
Re: Support for Hebrew fonts (.shx)
Posted: Mon Jul 05, 2021 9:54 pm
by CVH
shim wrote: ↑Mon Jul 05, 2021 6:45 pm
I think I'm not being clear: I have Miriam CLM fonts installed already system wide.
Ok, got it
What you can do is edit one text entity its font.
If 'Miriam CLM' is the last font in the list then QCAD did not made the match.
You can also see that the TTF file is called 'MiriamCLM-Book' or 'Bold' or 'MiriamMonoCLM ...'
What I also don't understand is that QCAD found 4 fonts and proposes to subtitute it with 'Miriam'.
Regards,
CVH
Re: Support for Hebrew fonts (.shx)
Posted: Mon Jul 05, 2021 11:07 pm
by Husky
I've the feeling (feeling! no proof!) that the font Miriam CLM is not a 100% match. And I think that the Miriam CLM fonts which we now find in the drawing is already a font substitution. Correct? If I'm right then we have no idea which font was proper working for this specific text line ...
Nevertheless - the font contains Arabic and Hebrew glyphs ...

- Husky-2021.07.05-04.png (30.35 KiB) Viewed 19724 times
... what means an outcome like this Hebrew written right to left ...

- Husky-2021.07.05-01.png (35.27 KiB) Viewed 19724 times
.... or Arabic written left to right ...

- Husky-2021.07.05-02.png (37.36 KiB) Viewed 19724 times
is possible with the same font depending on which input style the designer of the drawing has used.
If I would be in your situation I would try to get my hands on the original used fonts ...
CVH wrote: ↑Mon Jul 05, 2021 9:54 pm
shim wrote: ↑Mon Jul 05, 2021 6:45 pm
I think I'm not being clear: I have Miriam CLM fonts installed already system wide.
Ok, got it
What you can do is edit one text entity its font.
If 'Miriam CLM' is the last font in the list then QCAD did not made the match.
You can also see that the TTF file is called 'MiriamCLM-Book' or 'Bold' or 'MiriamMonoCLM ...'
What I also don't understand is that QCAD found 4 fonts and proposes to subtitute it with 'Miriam'.
Regards,
CVH
Re: Support for Hebrew fonts (.shx)
Posted: Tue Jul 06, 2021 8:02 pm
by shim
CVH wrote: ↑Mon Jul 05, 2021 9:54 pm
shim wrote: ↑Mon Jul 05, 2021 6:45 pm
I think I'm not being clear: I have Miriam CLM fonts installed already system wide.
Ok, got it
What you can do is edit one text entity its font.
If 'Miriam CLM' is the last font in the list then QCAD did not made the match.
You can also see that the TTF file is called 'MiriamCLM-Book' or 'Bold' or 'MiriamMonoCLM ...'
What I also don't understand is that QCAD found 4 fonts and proposes to subtitute it with 'Miriam'.
Regards,
CVH
I tried manually changing the font - all that does is change the font, not the encoding (which is the issue). Latin characters remain.
It found 4 fonts because there are 4 fonts that the draftsman used: HEBTXT, MYRIL, mirym, heb. All of these are .shx. Text is shown in 'properties' in Latin characters but is encoded into Hebrew on the sheet itself.
All I'm wondering if there's a magical way QCAD can read .shx fonts, because at this point it seems it can't even detect they exist.
Re: Support for Hebrew fonts (.shx)
Posted: Tue Jul 06, 2021 8:24 pm
by shim
Husky wrote: ↑Mon Jul 05, 2021 11:07 pm
I've the feeling (feeling! no proof!) that the font Miriam CLM is not a 100% match. And I think that the Miriam CLM fonts which we now find in the drawing is already a font substitution. Correct? If I'm right then we have no idea which font was proper working for this specific text line ...
I think you are right - the Miriam CLM is already a substitution. The original font was one of four: HEBTEXT, MIRYL, mirym, heb, all of which are .shx.
Nevertheless - the font contains Arabic and Hebrew glyphs ...
Husky-2021.07.05-04.png
... what means an outcome like this Hebrew written right to left ...
Husky-2021.07.05-01.png
.... or Arabic written left to right ...
Husky-2021.07.05-02.png
I actually manually changed the text you selected to unicode so that the characters would be natively Hebrew. That's why you see it that way. It's time consuming but doable for small sheets. It becomes a problem for large sheets as it then becomes outright cisyphic work.
is possible with the same font depending on which input style the designer of the drawing has used.
If I would be in your situation I would try to get my hands on the original used fonts ...
I think you're correct and the designer used an input style that isn't being processed by QCAD. Is there a way to configure styles?
I'm almost positive the designer used an .shx so QCAD won't detect it anyhow. Notice that the text characters are Latin.
Re: Support for Hebrew fonts (.shx)
Posted: Tue Jul 06, 2021 11:26 pm
by Husky
My problem is .............................. I don't speak Hebrew.
... and the www is not really helping me. Well, I found a Hebrew ttf font but I don't know how usable the substitution is. Makes this any sense??? I doubt that because the drawing has assumingly not anymore the original fonts

- Husky-2021.07.06-02.png (101.37 KiB) Viewed 19678 times
shim wrote: ↑Tue Jul 06, 2021 8:24 pm
Is there a way to configure styles?
You could create your own CXF font with QCAD:
https://www.qcad.org/en/tutorial-editing-cxf-fonts
Re: Support for Hebrew fonts (.shx)
Posted: Wed Jul 07, 2021 6:02 am
by CVH
shim wrote: ↑Tue Jul 06, 2021 8:02 pm
It found 4 fonts because there are 4 fonts that the draftsman used: HEBTXT, MYRIL, mirym, heb. All of these are .shx.
shim wrote: ↑Tue Jul 06, 2021 8:24 pm
I think you are right - the Miriam CLM is already a substitution. The original font was one of four: HEBTEXT, MIRYL, mirym, heb, all of which are .shx.
Then that was the wrong turn, here one should have provided {HEBTEXT, MIRYL, mirym, heb} in TTF format.
Most TTF fonts that support Hebrew glyphs have indeed the standard Latin characters up to 128,
where a compiled shape or font file (SHX) might associate Hebrew glyphs with those ASCII addresses.
shim wrote: ↑Tue Jul 06, 2021 8:02 pm
All I'm wondering if there's a magical way QCAD can read .shx fonts, because at this point it seems it can't even detect they exist.
That should have been the topic title.

I know of no functional route from SHX fonts to CXF fonts, the shape file format native to QCAD.
It might even be that SHX is a proprietary format.
But what I do find on that format tells me that many things in a SHX file can't be converted to the CXF format.
Regards,
CVH
Re: Support for Hebrew fonts (.shx)
Posted: Thu Jul 08, 2021 10:32 am
by shim
Husky wrote: ↑Tue Jul 06, 2021 11:26 pm
My problem is .............................. I don't speak Hebrew.
... and the www is not really helping me. Well, I found a Hebrew ttf font but I don't know how usable the substitution is. Makes this any sense??? I doubt that because the drawing has assumingly not anymore the original fonts
Husky-2021.07.06-02.png
Interesting, but no, it doesn't make any sense
Which ttf font did you use? It seems at least like a step in the right direction as the characters are Hebrew...
Thanks! I'm going to look into that.
Re: Support for Hebrew fonts (.shx)
Posted: Thu Jul 08, 2021 6:14 pm
by Husky
shim wrote: ↑Thu Jul 08, 2021 10:32 am
Which ttf font did you use? It seems at least like a step in the right direction as the characters are Hebrew...
https://freefontsdownload.net/find.php?q=hebrew
shim wrote: ↑Thu Jul 08, 2021 10:32 am
Thanks! I'm going to look into that.
Maybe you can use the mentioned Hebrew fonts to built a customized cxf font ...