Hirakakustdn-w8 Font

25 views
Skip to first unread message

Recaredo Latreche

unread,
Jul 26, 2024, 2:01:59 AM7/26/24
to reralbuyxi

Hi,
I'm new to ArchLinux and I'm trying to configure a LaTeX environment to make documents in Japanese but I'm having some troubles to get my documents in postscript.
I didn't have any problems with the compiler pLaTeX so I did manage to compile my tex files in dvi, but I am having problems with reading my dvi files with xdvi and transforming my files from dvi to ps with dvips. In both cases it seems that the fonts are not properly configured and I get this error :

I did look up for that and tried some solutions which seemed to have worked for other persons, such as adding a kanji.map file to map rml and adding this file with updmap --edit or updmap-sys --edit, but no way to get this to work properly.
I have the following fonts installed :

which I guess should be enough so I think it's only a problem of mapping, but I can't find any solution.
By the way, I did manage to make dvipdfmx work by adding the following lines to /etc/texmf/dvipdfmx/dvipdfmx.cfg

Basically, TeX is failing to find the font which you've asked for (rml). When it fails to find it ready-made, it assumes it might be in metafont format and looks for rules for creating a usable form. Those don't exist so, as a last resort, it falls back to a default font (Computer Modern Roman). But cmr won't work for Japanese because the characters just aren't there.

When I say you are looking at the wrong thing, you are looking at what fonts your *system* has installed. But TeX can't use system fonts - certainly not if you need the tex -> dvi -> ps route. It also cannot use truetype fonts this way. (Unless pLaTeX somehow enables all this.) So the question is, what fonts do you have installed for TeX to use?

Given what is working, it seems as if you might have the tex font metric files for the font installed correctly but that either the type 1 (or other) fonts aren't set up correctly or they aren't installed at all. The reason the dvipdfmx mode works is, I think, because you are not embedding fonts in the pdf. That means it is up to the system/viewer to supply the actual shapes of the characters. And apparently your set up is able to do this. (Either rml is installed and it recognises this or it is substituting an acceptable default.) However, the pdf file you produce in this way is not safe to send to another machine unless you know that machine also has suitable fonts available. So don't, for example, email somebody a job application with this set up because the pdf will not necessarily display correctly on their machine!

OK. So, I don't know anything about typesetting Japanese but:
- do you need the tex -> dvi -> ps route? Or would tex -> pdf with pdfLaTeX or something like XeLaTeX be a possibility? If XeLaTeX, say, is an option, you can avoid the entire mess which is TeX font set up and use system fonts directly, including truetype, opentype... whatever. If pdfLaTeX is an option, you need to deal with TeX font set up but you have a bit more flexibility e.g. support for truetype.
- what is rml?
- can you provide a minimal .tex file demonstrating the problem?
- how did you install your TeX system? If you used Arch packages, which packages do you have installed, especially font packages?

Hi and thank you very much for your answer.
Actually I've always been using TeX as a complete end user so I never really think of what was really going on when compiling and so on.
By reading your answer I did understand what was really the problem but though I tried a little harder to fix that I still wasn't able to get it to work.
However I think that this time dvipdfmx should be working properly (with embarked fonts).
For Japanese, I have the following fonts :

To answer your questions, I would not mind using something else than dvi -> ps -> pdf, but is it possible to get the TikZ package (which seems to rely on pstricks) to work with pdfLaTeX or XeLaTeX ?
As far as I could look up for, rml is the name of a TFM file for Japanese fonts and by extension the name of this font.
For a minimal file, anything with Japanese will do, right now I'm just trying to compile :

I installed TeX with pacman, by installing the group texlive-most (which contains texlive-fontsextra), and the packages texlive-langcjk and texlive-langextra. Finally, I installed the fonts showned above in /usr/share/fonts/japanese-otf manually.

The changes I tried to make were all global changes, but as it just didn't seem to work I restored the original configuration, so the only difference there should be between my installation and the basic one should be what I appended in dvipdfmx.cfg, and the fonts that I manually installed.

Why do you think it relies on pstricks? I don't know much about it (though I've used pgf a little) but an admittedly quick look at the documentation didn't suggest it was required. I think it probably depends on just which parts of the package you are using though and that pstricks may be essential for some features but not others. So you'd need to read the manual files for the specific packages you're using and/or experiment to figure out if it is a dependency for you. There doesn't seem to be that much mention of pstricks in the source of the documentation but that might not mean much.

As far as I could look up for, rml is the name of a TFM file for Japanese fonts and by extension the name of this font.
For a minimal file, anything with Japanese will do, right now I'm just trying to compile :

If I compile this with platex, I get an empty dvi. If I convert to ps with dvips, I get something which is obviously not Japanese and if I convert that to pdf, I get something which is obviously not Japanese. I'm not getting the errors you're seeing but I'm also not getting a dvi which looks anything like OK. But this is presumably because I don't have Japanese fonts installed for my system generally.

I also tried compiling sample.tex from the documentation directory for platex. I don't get errors but I get a blank dvi and non-Japanese output in the final ps/pdf. The pre-compiled sample.pdf which comes with the package looks fine. But that was compiled with dvipdfmx. I assume that you would expect this to work i.e. that it works on other TeX setups you've used? Just with platex -> dvips -> ps2pdf ?

I would try avoiding the system fonts for now and using ones which come with texlive, if possible. I have a map file at texmf-dist/fonts/map/dvipdfmx/ptex/morisawa.map which gives a different mapping for rml. There are tfm and vf files corresponding to this map on my installation. Note that I did not install texlive through pacman and I don't know how the packagers have split the packages or exactly where they are located on your system.

Do you know if the standard tools for working with .vf and .tfm files should work for Japanese fonts? I ask because I get errors if I try to convert these files to readable format and file doesn't recognise the tfm files, at least, as tfm files. These commands work fine on e.g. a random tfm I picked under adobe/palantino. I was trying to figure out which fonts these were pointing to. Unfortunately, I know nothing about Japanese fonts but I'd have expected the tools to work if they are regular tfm files.

and the output is completely broken.
Anyway, the situation improved a little, but I'm now having troubles with Ghostcript.
Finally, I downloaded a Japanese latex installation which was supposed to work from this site, compiled everything and put the texmf-var in my home directory. I appended ptex-hiragino to my dvipdfmx.cfg file, and that was ok for dvipdfmx to work properly. When running pdffonts on the pdf produced by dvipdfmx I got

so I think that the fonts are embarked without any problem.
dvips already seemed to be working properly, to check that I tried to compile the ps file to pdf on an other installation and I did not have any problem with that.
The only problem left now is to configure Ghostscript.
The error message is pretty clear, but I coudn't get gs to find the fonts it is looking for :

Yes, the fonts are being subsetted and embedded when you generate the pdf. That's good. I think it means that tex is finding the fonts OK now. (I'm not quite sure what complications you may have from having two texlive installations, though, if that's what you've done. But if it works,,,)

Vaucanson-G is based on PSTricks and PSTricks does not generate dvi instructions but instead
directly generate postscript commands. As a result, the drawings composed by Vaucanson-G
are not correctly visible under a dvi previewer. A very common outcome is an unscaled drawing and
all the labels are written at the origin.

So I'm not sure you should expect it to display in a dvi previewer or to work correctly via that route? I don't know much about generating postscript, though. And if this is true of pstricks generally, I'm not sure any document using it will display via xdvi...

Try gs -h and read the man page for gs - you may need to e.g. set GS_FONTPATH since the fonts in your home texlive directory won't be in gs's default search path. From memory, you may need to issue a setup command to get the fonts to work properly, too, but it is a while since I configured gs. (I'm just using pacman's default install right now, as I'm assuming you are.)

Hira Kaku StdN-W8 is a free Japanese font / typeface which can be used for commercial purposes without having to obtain permission from the original author. Download Hira Kaku StdN-W8 Japanese font for free.

This is a preview for this torrent. It's not a definitive collection of fonts, since that torrent is missing many. I removed fonts which did not support any Japanese characters. For more Japanese font previews, see: work, fun, and this image. Also note that many of these fonts display certain Japanese characters incorrectly.

The purpose of this Apple software is to protect Apple copyrighted materials from unauthorized copying and use. You may not copy, modify, reverse engineer, publicly display, publicly perform, sublicense, transfer or redistribute this file, in whole or in part. If you have obtained a copy of this Apple software and do not have a valid license from Apple Computer to use it, please immediately destroy or delete it from your computer.

Reply all
Reply to author
Forward
0 new messages