Hi,
On 26/10/2019 11:53, Ady Ady via Syslinux wrote:>
>> Hi.
>> I was trying to make syslinux to display russian letters.
>>
>> This page
>> https://wiki.syslinux.org/wiki/index.php?title=Directives/font says
>> that for Cyrillic you need a CP855. Is that correct? All other
>> guides in internet say that you need CP866.
>
>
> The "original" Code Page for Cyrillic for MS-DOS is
"cp855".
>
> There are several alternative Cyrillic fonts (that were created
> later-on). This means that, when using one particular font/codepage
> (e.g. cp855), one scancode might be "translated" into one
particular
> glyph on screen, but when using a different font/codepage (e.g. cp866)
> the resulting glyph on screen might be different than when using the
> first font.
>
> Additionally, saving the syslinux.cfg file itself with a different
> codepage _might_ affect the resulting glyphs when showing the boot menu
> (or the boot CLI). The same might be relevant for so-called
"display"
> (aka "help") files being shown by Syslinux.
>
> Please note that the codepage that is used for saving the syslinux.cfg
> (and/or the "display") file is independent of the font that is
being
> used by whichever program that is displaying the file when you edit it.
> In other words, what you see when you edit the syslinux.cfg/display
> file(s) might not be the same as the resulting glyphs being shown while
> booting with Syslinux.
>
> Within the "kbd" package for ArchLinux, I would suggest reading
(for
> some examples/hints):
>
> usr/share/kbd/consolefonts/README.Cyrillic
>
> There are other readme files that include relevant notes for Cyrillic
> too.
>
> The AltLinux community/users might be able to help too.
>
> For curious (ArchLinux's) users, the following page (preview of console
> fonts as PNGs) might be of interest (but, please note that not every
> font shown there is compatible with Syslinux/psf1 fonts):
>
> https://alexandre.deverteuil.net/pages/consolefonts/
>
>
>> I finally got it working. My config file was encoded in ibm866
>> correctly, but the problem was the font file itself. I am on Arch
>> Linux, so I run gunzip -c
>> /usr/share/kbd/consolefonts/cp866-8x16.psf.gz > cp866-8x16.psf And
>> Russian text was not displayed correctly.
>>
>> Then I checked it with "file cp866-8x16.psf" and it was:
>> cp866-8x16.psf: Linux/i386 PC Screen Font v2 data, 256 characters, no
directory, 16x8
>
>
> ATM, Syslinux doesn't support psf2.
>
>
>> In that wiki page it is said that font should be PSF1 format. Here I
>> have found a guide with file attached 866_8x16.psf:
>> http://greenflash.su/Syslinux/files/example.htm
>>
>> I have downloaded it, and checked with "file 866_8x16.psf":
>> 866_8x16.psf: Linux/i386 PC Screen Font v1 data, 256 characters,
Unicode directory, 8x16
>> And Russian letters were displayed correctly!
>
>
> That's an adequate combination: 8x16 bits, psf1, and the syslinux.cfg
> file saved in an adequate codepage.
>
>
>> But how could I get such file without external blog posts? Is it
>> possible to convert psf2 font to psf1 format?
>>
>> Also, I have found this question: https://toster.ru/q/138495 and there
>> is a config with russian letters and with using Cyr_a8x16.psf font. I
>> again used an ungzipped file from Arch Linux, but it did not
>> displayed russian letters. It was again a v2 font "file
>> Cyr_a8x16.psfu": Cyr_a8x16.psfu: Linux/i386 PC Screen Font v2
data,
>> 256 characters, Unicode directory, 16x8
>
>
> As the Syslinux wiki explains, you need one font file being compatible
> with psf1, 8x16 bits, 256 glyphs (additional glyphs are accepted but
> ignored).
>
> As already mentioned, Syslinux at the moment does not support psf2 font
> files.
>
>
>> Were psf1 fonts gone from kbd package, but still required to be used
>> with syslinux?
>
>
> I think that the kbd package still includes psf1 files, together with
> psf2 files. Some of these might include Unicode too, which Syslinux
> ignores. So, AFAIK, psf1 fonts are not "gone".
>
> Additionally, the wiki page also mentions some additional possible font
> files that might be slightly different than those already included in
> the kbd package.
>
> At any rate, any font file that is expected to be used by Syslinux
> should/shall be compatible with the features that are already explained
> in the wiki (which I already repeated here in this email). The result
> of using font files with different characteristics than those that are
> expected by Syslinux is unknown / undetermined.
>
> Regards,
> Ady.
seel also if you didn't came across it yet:
https://www.win.tue.nl/~aeb/linux/kbd/font-formats-1.html
especially the last paragraph. So both syslinux and the psf1
format were designed by hpa <smile>
Best,
Didier