unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* encoding of font-name with unicode branch new font-backend
@ 2006-12-07  8:06 Miles Bader
  2006-12-07 11:21 ` Kenichi Handa
  0 siblings, 1 reply; 6+ messages in thread
From: Miles Bader @ 2006-12-07  8:06 UTC (permalink / raw)
  Cc: emacs-devel

If I do "C-u C-x =" on a character which is displayed with a
font-backend font that has a non-latin name, the font-name is not
displayed correctly:  It's displayed as raw binary characters, which are
actually the bytes of a UTF-8 encoded font name.

It seems that somewhere (decode-coding-string ... 'utf-8) has to be
called on the font name, but I'm not sure which layer has the knowledge
that the string is actually utf-8...

-miles
-- 
Fast, small, soon; pick any 2.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encoding of font-name with unicode branch new font-backend
  2006-12-07  8:06 encoding of font-name with unicode branch new font-backend Miles Bader
@ 2006-12-07 11:21 ` Kenichi Handa
  2006-12-07 11:28   ` James Cloos
  2006-12-07 17:56   ` Juliusz Chroboczek
  0 siblings, 2 replies; 6+ messages in thread
From: Kenichi Handa @ 2006-12-07 11:21 UTC (permalink / raw)
  Cc: emacs-unicode, emacs-devel

In article <buor6vcuo2y.fsf@dhapc248.dev.necel.com>, Miles Bader <miles.bader@necel.com> writes:

> If I do "C-u C-x =" on a character which is displayed with a
> font-backend font that has a non-latin name, the font-name is not
> displayed correctly:  It's displayed as raw binary characters, which are
> actually the bytes of a UTF-8 encoded font name.

> It seems that somewhere (decode-coding-string ... 'utf-8) has to be
> called on the font name, 

I agree.

> but I'm not sure which layer has the knowledge
> that the string is actually utf-8...

Me neither. :-(
It seems that fontconfig can contains FC_FAMILYLANG property
in FcPattern, but there's no FC_FAMILY_ENCODING.
---
Kenichi Handa
handa@m17n.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encoding of font-name with unicode branch new font-backend
  2006-12-07 11:21 ` Kenichi Handa
@ 2006-12-07 11:28   ` James Cloos
  2006-12-07 12:47     ` James Cloos
  2006-12-07 17:56   ` Juliusz Chroboczek
  1 sibling, 1 reply; 6+ messages in thread
From: James Cloos @ 2006-12-07 11:28 UTC (permalink / raw)
  Cc: emacs-unicode, emacs-devel, Miles Bader

>>>>> "Kenichi" == Kenichi Handa <handa@m17n.org> writes:

Miles> but I'm not sure which layer has the knowledge
Miles> that the string is actually utf-8...

Kenichi> Me neither. :-(
Kenichi> It seems that fontconfig can contains FC_FAMILYLANG property
Kenichi> in FcPattern, but there's no FC_FAMILY_ENCODING.

My understanding is that it is always utf-8.

I'll look through the code to be sure and write back if I am wrong.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encoding of font-name with unicode branch new font-backend
  2006-12-07 11:28   ` James Cloos
@ 2006-12-07 12:47     ` James Cloos
  2006-12-07 12:56       ` Kenichi Handa
  0 siblings, 1 reply; 6+ messages in thread
From: James Cloos @ 2006-12-07 12:47 UTC (permalink / raw)
  Cc: emacs-unicode, Miles Bader, emacs-devel

>>>>> "|" == James Cloos <cloos@jhcloos.com> writes:

|> My understanding is that it is always utf-8.

If I am reading the src correctly it does transcode everything to utf8.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encoding of font-name with unicode branch new font-backend
  2006-12-07 12:47     ` James Cloos
@ 2006-12-07 12:56       ` Kenichi Handa
  0 siblings, 0 replies; 6+ messages in thread
From: Kenichi Handa @ 2006-12-07 12:56 UTC (permalink / raw)
  Cc: emacs-unicode, emacs-devel, miles

In article <m3veknan3r.fsf@lugabout.jhcloos.org>, James Cloos <cloos@jhcloos.com> writes:

>>>>>> "|" == James Cloos <cloos@jhcloos.com> writes:
>>> My understanding is that it is always utf-8.

> If I am reading the src correctly it does transcode everything to utf8.

Thank you for checking that.  Ok, I'll improve the code.

---
Kenichi Handa
handa@m17n.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: encoding of font-name with unicode branch new font-backend
  2006-12-07 11:21 ` Kenichi Handa
  2006-12-07 11:28   ` James Cloos
@ 2006-12-07 17:56   ` Juliusz Chroboczek
  1 sibling, 0 replies; 6+ messages in thread
From: Juliusz Chroboczek @ 2006-12-07 17:56 UTC (permalink / raw)
  Cc: emacs-unicode, emacs-devel, Miles Bader

>> but I'm not sure which layer has the knowledge that the string is
>> actually utf-8...

Theory: it is always UTF-8.

Practice: it will always be UTF-8 for fonts in the TrueType/OpenType
format.  For fonts in weird formats, all bets are off.

I suggest you treat it as UTF-8, but you should be robust if it turns
out not to be well-formed UTF-8.

                                        Juliusz

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-12-07 17:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-07  8:06 encoding of font-name with unicode branch new font-backend Miles Bader
2006-12-07 11:21 ` Kenichi Handa
2006-12-07 11:28   ` James Cloos
2006-12-07 12:47     ` James Cloos
2006-12-07 12:56       ` Kenichi Handa
2006-12-07 17:56   ` Juliusz Chroboczek

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).