You are not logged in.

#1 2021-09-26 20:18:57

mallocman
Member
From: Slovenia
Registered: 2012-08-16
Posts: 16

[SOLVED] Groff problem with the unicode character u0043_030C

Hi,

I am writing a document using groff and having issues printing characters 'Čč' when using pdf,ps or dvi output formats.
Strangely 'šŠžŽ' chars work without any problems.

$ cat test.ms 
.PP
Č蚊žŽ
$ groff -ms -k -K utf8 -T pdf test.ms > test.pdf
troff: test.ms:2: warning: can't find special character 'u0043_030C'
troff: test.ms:2: warning: can't find special character 'u0063_030C'
$ groff -T utf8 -k test.ms                                  
Č蚊žŽ

Default type to .ps produces same warning

$ groff -ms -k -K utf8 test.ms > test.ps
troff: test.ms:2: warning: can't find special character 'u0043_030C'
troff: test.ms:2: warning: can't find special character 'u0063_030C'

Producing utf8 work without any problems.

$ groff -T utf8 -k test.ms                                  
Č蚊žŽ

I have already tried workarounds like \[vc] \[c ah] \[u0043_030C] \*[v]c without success.
Strange thing is that groff_char manpage does not mention characters 'čČ'. Is this a groff issue/shortcoming or a problem with installed fonts or maybe a missconfigured system localization.

Any advice is greatly appreciated.

Last edited by mallocman (2021-10-03 17:16:52)

Offline

#2 2021-09-26 22:42:48

mpan
Member
Registered: 2012-08-01
Posts: 720
Website

Re: [SOLVED] Groff problem with the unicode character u0043_030C

As a workaround, does it work if you use the pre-composed forms: Č and č, U+010C and U+010D respectively? That shouldn’t be needed and I see that as a bug in Unicode handling, but maybe that will at least let you use it before the bug is fixed.


Sometimes I seem a bit harsh — don’t get offended too easily! PGP: 7C848198AE93D3BB

Offline

#3 2021-09-27 09:03:08

mallocman
Member
From: Slovenia
Registered: 2012-08-16
Posts: 16

Re: [SOLVED] Groff problem with the unicode character u0043_030C

Thank you for a quick response.
Unfortunately pre-composed forms also does not work.

% cat test.ms 
.NH
Č \" Not rendered
č \" Not rendered
š
Š
ž
Ž
.NH
\[ah] \" Renders caron character
\[s ah] \" Compositing s and caron produces š
\[c ah] \" Compositing c and caron produces nothing
.NH
\[U+010C] \" Not rendered
\[U+010D] \" Not rendered
\[u0043_030C] \" Not rendered

% groff -Tpdf -k test.ms > test.pds
troff: test.ms:2: warning: can't find special character 'u0043_030C'
troff: test.ms:3: warning: can't find special character 'u0063_030C'
troff: test.ms:13: warning: can't find special character 'U+010C'
troff: test.ms:14: warning: can't find special character 'U+010D'

It is strange why compositing does not work:

\[ah] \" Renders caron character
\[s ah] \" Compositing s and caron produces š
\[c ah] \" Compositing c and caron produces nothing

Offline

#4 2021-09-27 09:44:34

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,342

Re: [SOLVED] Groff problem with the unicode character u0043_030C

On my setup \[C ah] produces Č
I am using mom macros and compiling using
pdfmom -Utep file.mom > file.pdf

EDIT: try changing font, may that character is not present in your selected font.

EDIT2: indeed this is font problem, I tried different fonts, and some fonts don't have c caret. I have compiled adobe caslon for groff and it has c caret.

Last edited by Docbroke (2021-09-27 09:52:11)


Arch is home!
cwm rofi weaver vifm vis lizzy pass terminator
https://github.com/Docbroke

Offline

#5 2021-09-27 19:04:25

mallocman
Member
From: Slovenia
Registered: 2012-08-16
Posts: 16

Re: [SOLVED] Groff problem with the unicode character u0043_030C

Thank you for tying it out.
It definitely looks like a font issue. Since I am using the default build in (Times New Roman) font i consider this shortcoming as a bug.
I am new to using Groff. Can you please point me in the right direction, how to install and where to get new fonts?

I have found this video tutorial (https://www.youtube.com/watch?v=CzUHjtGBdZs) and installed CM font-family using mom ./install-font.sh script found here: http://www.schaffter.ca/mom/mom-06.html#install-font.
Using this procedure i have installed fonts, downloaded from: http://www.ams.org/arc/tex/amsfonts.zip

Unfortunately, newly installed font does not render any later with caron (čšž).
Where can I get and how can I compile adobe casion font?

At this point I am so frustrated that i would rather write everything in english, but sadly my last name contains character Č sad

Edit:
I finally did it smile
For others, install-font.sh script is also able to process .ttf fonts.
I have downloaded Adobe Caslon Pro from: https://fontsgeek.com/fonts/Adobe-Caslon-Pro-Regular

@Docbroke: Thank you for the advice.

Last edited by mallocman (2021-09-27 19:33:58)

Offline

#6 2021-09-28 02:42:38

Docbroke
Member
From: India
Registered: 2015-06-13
Posts: 1,342

Re: [SOLVED] Groff problem with the unicode character u0043_030C

I don't have much  experience with groff either. I did recently prepare our journal using groff with mom macros. So as per my experience mom macros are much better documented and it's creator peter schaffter is easy to access. You have already found his site.

I am glad you solved it. Please mark the thread solved by editing your first post and adding [solved] to the title.

Last edited by Docbroke (2021-09-28 02:45:24)


Arch is home!
cwm rofi weaver vifm vis lizzy pass terminator
https://github.com/Docbroke

Offline

Board footer

Powered by FluxBB