FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 08-12-2008, 01:47 PM
"Rahul Bhalerao"
 
Default Problem enabling new language on gdm language selection list

For adding a language on gdm's login screen, apart from having a
locale file, few translations and required fonts, it is required that
language is recognized by fontconfig.
To make a fontconfig recognize the language, a related lang.orth file
is required. With my experiment on this, I think there is also need to
add an entry to fcfreetype.c of fontconfig and related language code
entry in ttnameid.h of freetype2. After making all these changes the
language is listed in the gdm's list. But this has a problem, as the
entries of language code in ttnameid.h are MS and MAC codes for these
languages and there are languages that do not have these codes but are
included in iso639-2 language codes.
Thus my question is, how much important is it to have an entry for the
language in the file fcfreetype.c of fontconfig and related entry in
the header file ttnameid.h of freetype2? And what is to be done for
the language that does not have MS or MAC code? Is it possible to use
our own codes?

Can anyone please help resolving this?


--
Rahul.
http://b.rahul.pm.googlepages.com/home
- http://rahulpmb.blogspot.com
- http://samadiyami.blogspot.com
- http://mazikavita.blogspot.com

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 08-12-2008, 02:07 PM
Matthias Clasen
 
Default Problem enabling new language on gdm language selection list

On Tue, 2008-08-12 at 19:17 +0530, Rahul Bhalerao wrote:
> For adding a language on gdm's login screen, apart from having a
> locale file, few translations and required fonts, it is required that
> language is recognized by fontconfig.
> To make a fontconfig recognize the language, a related lang.orth file
> is required. With my experiment on this, I think there is also need to
> add an entry to fcfreetype.c of fontconfig and related language code
> entry in ttnameid.h of freetype2. After making all these changes the
> language is listed in the gdm's list. But this has a problem, as the
> entries of language code in ttnameid.h are MS and MAC codes for these
> languages and there are languages that do not have these codes but are
> included in iso639-2 language codes.
> Thus my question is, how much important is it to have an entry for the
> language in the file fcfreetype.c of fontconfig and related entry in
> the header file ttnameid.h of freetype2? And what is to be done for
> the language that does not have MS or MAC code? Is it possible to use
> our own codes?
>
> Can anyone please help resolving this?

Ray (who wrote most of this code) is busy doing something else right
now, so let me summarize what I know about this:

What gdm does it is only shows a language in the list if a) we have
translations for it and b) we have fonts for it. For b), we basically
ask fontconfig "do you have fonts for this language ?". It seems that
fontconfig says "no" if it doesn't know the language. It would be better
if fontconfig could say "I don't know" in that case...

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 08-12-2008, 03:22 PM
Behdad Esfahbod
 
Default Problem enabling new language on gdm language selection list

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matthias Clasen wrote:
> For b), we basically
> ask fontconfig "do you have fonts for this language ?". It seems that
> fontconfig says "no" if it doesn't know the language. It would be better
> if fontconfig could say "I don't know" in that case...

One way to detect that fontconfig doesn't know about the language is by
querying the newly added FcLangGetCharSet(). It returns NULL if it doesn't
know.

behdad

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkihqqgACgkQn+4E5dNTERU5NgCbB/wfDVWBqzQjMYJxqyvOKNRL
kAgAn3WV+V9VDVugPJ4Psq6Qn02d4o66
=dhTm
-----END PGP SIGNATURE-----

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 08-13-2008, 01:15 PM
"Rahul Bhalerao"
 
Default Problem enabling new language on gdm language selection list

On Tue, Aug 12, 2008 at 7:37 PM, Matthias Clasen <mclasen@redhat.com> wrote:

> What gdm does it is only shows a language in the list if a) we have
> translations for it and b) we have fonts for it. For b), we basically
> ask fontconfig "do you have fonts for this language ?". It seems that
> fontconfig says "no" if it doesn't know the language. It would be better
> if fontconfig could say "I don't know" in that case...
>

Apart from these three conditions, even if fontconfig knows the
language, is it necessary that fcfreetype.c has MAC language code
defined for that language, in order to list it in gdm?

When I tried adding .orth file, the "fc-list fontname lang" listed the
appropriate language, but still it did not appear in gdm list until,
the definitions were made in fcfreetype.c and ttnameid.h.

Rahul.

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 08-14-2008, 06:04 AM
Matthias Clasen
 
Default Problem enabling new language on gdm language selection list

On Wed, 2008-08-13 at 18:45 +0530, Rahul Bhalerao wrote:
> On Tue, Aug 12, 2008 at 7:37 PM, Matthias Clasen <mclasen@redhat.com> wrote:
>
> > What gdm does it is only shows a language in the list if a) we have
> > translations for it and b) we have fonts for it. For b), we basically
> > ask fontconfig "do you have fonts for this language ?". It seems that
> > fontconfig says "no" if it doesn't know the language. It would be better
> > if fontconfig could say "I don't know" in that case...
> >
>
> Apart from these three conditions, even if fontconfig knows the
> language, is it necessary that fcfreetype.c has MAC language code
> defined for that language, in order to list it in gdm?
>
> When I tried adding .orth file, the "fc-list fontname lang" listed the
> appropriate language, but still it did not appear in gdm list until,
> the definitions were made in fcfreetype.c and ttnameid.h.
>

I don't know offhand why that would be. Here is the code that gdm
uses to determine if a language has sufficient font support:

pattern = FcPatternBuild (NULL, FC_LANG, FcTypeString, language_code,
NULL);

if (pattern == NULL)
goto done;

object_set = FcObjectSetBuild (NULL, NULL);

if (object_set == NULL)
goto done;

font_set = FcFontList (NULL, pattern, object_set);

if (font_set == NULL)
goto done;

is_displayable = (font_set->nfont > 0);


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 08-14-2008, 08:14 PM
Behdad Esfahbod
 
Default Problem enabling new language on gdm language selection list

Rahul Bhalerao wrote:
> On Tue, Aug 12, 2008 at 7:37 PM, Matthias Clasen <mclasen@redhat.com> wrote:
>
>> What gdm does it is only shows a language in the list if a) we have
>> translations for it and b) we have fonts for it. For b), we basically
>> ask fontconfig "do you have fonts for this language ?". It seems that
>> fontconfig says "no" if it doesn't know the language. It would be better
>> if fontconfig could say "I don't know" in that case...

Patch for this committed upstream:
http://bugzilla.gnome.org/show_bug.cgi?id=547826

I'll build it in rawhide when koji is back.

> Apart from these three conditions, even if fontconfig knows the
> language, is it necessary that fcfreetype.c has MAC language code
> defined for that language, in order to list it in gdm?
>
> When I tried adding .orth file, the "fc-list fontname lang" listed the
> appropriate language, but still it did not appear in gdm list until,
> the definitions were made in fcfreetype.c and ttnameid.h.

That makes no sense. The only thing those values are used for is to extract
localized family and style names from font files. Those values are defined by
MS and can't be free extended. And your fonts needs to use it for them to
have any effect at all.

> Rahul.

behdad

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 05:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org