unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adrian Robert <arobert@cogsci.ucsd.edu>
Subject: Re: Probably dumb question: glyph rendering on unicode-2 branch
Date: Mon, 24 Oct 2005 10:43:04 -0400	[thread overview]
Message-ID: <BD5A24D1-F3BD-4AC9-8762-8E4917C83D2E@cogsci.ucsd.edu> (raw)
In-Reply-To: <09B15CC4-37F2-4B0F-8487-2037B482D1CC@cogsci.ucsd.edu>

Hi,

I didn't get any response to the below, let me try asking it in a  
different way:

unicode-2 branch:
   dispextern.h:

     struct glyph {
     ...
         /* Character code for character glyphs (type ==  
CHAR_GLYPH).  */
         unsigned ch;
     ...
     }
     ...
     struct glyph_string {
     ...
     /* Characters to be drawn, and number of characters.  */
     XChar2b *char2b;
     int nchars;
     ...
     }

   {x,mac,w32}term.c:

     x_encode_char(int c, XChar2b *char2b, ...)
     {
     ...
     }

     x_draw_glyph_string(struct glyph_string *s)
     {
     ...
     }

Questions:

1) Is 'int c' passed to x_encode_char() the same as 'unsigned ch' in  
struct glpyh?

2) In either case, what are they -- UCS-2?  UTF-16?  MULE?  UCS-4?   
UTF-32?  What is the byte ordering?

I'll be happy to RTFM if this is documented anywhere..

thanks,
Adrian




On Oct 17, 2005, at 9:46 AM, Adrian Robert wrote:

> Hi,
>
> I apologize if this is a dumb question, but I've been looking  
> through the code and can't figure this one out: on the unicode-2  
> branch, if a font specifies "iso-10646-1" for XLFD registry/ 
> encoding (and then fontset.c sets 'charset' accordingly), what  
> exactly is getting passed in struct glyph_string.char2b to  
> x_draw_glyph_string()?  Not UTF-8, since it's just 2 bytes.   
> UCS-2?  UTF-16?  Don't these exclude a lot of unicode characters?   
> Is that what the "composition" machinery is for?  (But I thought  
> that had to do with the script itself involving composition, like  
> Arabic or Korean Hangul..)
>
> Does emacs provide any internal facility to get UTF-8?
>
> Also, what (encoding) is in glyph.u.ch?  Is that UCS-4?  UTF-32?
>
> thanks,
> Adrian
>
>

  reply	other threads:[~2005-10-24 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-17 13:46 Probably dumb question: glyph rendering on unicode-2 branch Adrian Robert
2005-10-24 14:43 ` Adrian Robert [this message]
2005-10-25  1:33   ` Kenichi Handa
2005-10-25  3:24     ` Adrian Robert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BD5A24D1-F3BD-4AC9-8762-8E4917C83D2E@cogsci.ucsd.edu \
    --to=arobert@cogsci.ucsd.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).