[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fonts and mostCompatibleEncodig
From: |
Serg Stoyan |
Subject: |
Re: fonts and mostCompatibleEncodig |
Date: |
Tue, 16 Apr 2002 14:40:01 +0300 |
User-agent: |
Mutt/1.3.16i |
Hello, Sir Raorn.
SR> Here it is. I don't know how, but i got koi8-1 enc-reg pair
SR> for font -*-helvetica-medium-r-normal--12-*-*-*-p-*-koi8-r.
SR> Maybe something wrong with my fontserver? But talked to other
SR> russian people using GNUstep I've figured that they have the
SR> same problem. Here is the patch ("dirty hack" is better name
SR> I think) for [+GSFontInfo encodingForRegistry: encoding:].
The problem not in fontserver nor in gnustep. This is font problem.
Even if you have such string in your fonts.dir or fonts.alias:
helv12.pcf -*-helvetica-medium-r-normal--12-*-*-*-p-*-koi8-r
and inside the font file helv12.pcf exist such string:
-Adobe-Helvetica-Bold-R-Normal--12-120-75-75-P-70-koi8-1
GSFontInfo returns koi8-1 enc-reg pair. So this is a font problem.
SR> + return NSKOI8RStringEncoding;
SR> + else if ([encoding isEqualToString: @"u"])
I guess here better replace NSKOI8REncodingString with
NSKOI8UEncodingString, but there is no such encoding in the GNUstep yet.
There is sense to add one because of some differences between KOI8-R
and KOI8-U encodings. Moreover, iconv() doesn't not works correctly
while converting KOI8-U text with KOI8-R scheme. What about adding
KOI8-U encoding? I guess a few strings:
{NSKOIURStringEncoding, "NSKOI8UStringEncoding","KOI8-U",0,0},
into Unicode.m file
NSKOIURStringEncoding = 38,
or
NSKOIURStringEncoding = 46,
into NSString.h file, must be added. I can make the patch as well.
--
Serg Stoyan