From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.devel Subject: Re: Probably dumb question: glyph rendering on unicode-2 branch Date: Mon, 24 Oct 2005 10:43:04 -0400 Message-ID: References: <09B15CC4-37F2-4B0F-8487-2037B482D1CC@cogsci.ucsd.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1130165227 32018 80.91.229.2 (24 Oct 2005 14:47:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2005 14:47:07 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 24 16:47:00 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EU3Xn-0006LA-1Y for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2005 16:43:23 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EU3Xm-0007Pe-GI for ged-emacs-devel@m.gmane.org; Mon, 24 Oct 2005 10:43:22 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EU3Xd-0007PP-N4 for emacs-devel@gnu.org; Mon, 24 Oct 2005 10:43:13 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EU3Xb-0007PC-R0 for emacs-devel@gnu.org; Mon, 24 Oct 2005 10:43:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EU3Xb-0007P9-Ng for emacs-devel@gnu.org; Mon, 24 Oct 2005 10:43:11 -0400 Original-Received: from [140.251.0.25] (helo=smtp-in2.med.cornell.edu) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EU3Xb-0004sX-NJ for emacs-devel@gnu.org; Mon, 24 Oct 2005 10:43:11 -0400 Original-Received: from mpx2.med.cornell.edu (pc113142-10.med.cornell.edu [140.251.11.119]) by smtp-in2.med.cornell.edu (Switch-3.1.6/Switch-3.1.6) with ESMTP id j9OEh6MX231766 for ; Mon, 24 Oct 2005 10:43:07 -0400 Original-Received: from [140.251.33.115] by mpx2.med.cornell.edu (Sun Java System Messaging Server 6.1 HotFix 0.11 (built Jan 28 2005)) with ESMTP id <0IOV00HLLCVTZ900@mpx2.med.cornell.edu> for emacs-devel@gnu.org; Mon, 24 Oct 2005 10:43:05 -0400 (EDT) In-reply-to: <09B15CC4-37F2-4B0F-8487-2037B482D1CC@cogsci.ucsd.edu> Original-To: emacs-devel@gnu.org X-Mailer: Apple Mail (2.734) X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.1.0.0, Antispam-Data: 2005.10.24.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:44724 Archived-At: 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 > >