unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Adrian Robert <arobert@cogsci.ucsd.edu>
Cc: emacs-devel@gnu.org
Subject: Re: Release timelines and Unicode2 branch
Date: Thu, 22 Sep 2005 07:53:34 -0400	[thread overview]
Message-ID: <94db199901ddd1390e7e687f4391530d@cogsci.ucsd.edu> (raw)
In-Reply-To: <44552CA0-C210-4986-8350-096C3654CEEE@mac.com>


On Sep 22, 2005, at 2:03 AM, Steven Tamm wrote:

> As for the unicode branch, the way that unicode font handling is done 
> on the Mac (ATSUI) is different from the old-style (Quickdraw) that is 
> used in the Carbon port.    Quickdraw is based on MBTE and converting 
> it to unicode is hard.  I've done some work on rewriting the text 
> rendering to use ATSUI, but I ran into some performance problems due 
> to the way that fonts and styles are handled in ATSUI .  It would be 
> easier to port a GNUStep based version to use utf8 in an efficient 
> manner based on NSLayoutManager: but any GNUStep based version of 
> Emacs will suffer from some pretty tricky threading issues due to 
> Apple's strange implementation of menu handling.  It took a lot of 
> effort to figure it out with Carbon.  Also, maintaining backwards 
> compatibility of font spec's is nigh impossible.  But I haven't looked 
> at the cocoa port of emacs in forever.

Yup, been there and done that in the 20.7-based Emacs on Aqua (yes, bad 
name.. ;).  I used about 4-5 different text rendering methods at 
various times, and 3 or 4 of them are still in the code used in various 
situations.  The one used on OS X 10.3/10.4 uses ATSUI to obtain fonts, 
but little else.  Characters are passed as UTF-8 to a low-level API 
that NSLayoutManager itself uses.  Either Quartz or Quickdraw 
antialiasing can be used when actually rendering.

I also tried using a pure NSLayoutManager solution.  Very easy, and the 
huge win is that backup fonts are chosen automatically 
character-by-character to render glyphs that aren't in the main font.  
The backups are chosen to match the appearance of the main font as 
closely as possible.  In other words, automatic "fontset" handling for 
free.  The penalty is it was slow in the way that Emacs had to use it.  
Ordinarily, one throws the entire text of a buffer into the system, 
then tells it which parts to render.  With emacs, the core sends the 
rendering front end just the on-screen text (as emacs "glyphs"), so you 
keep having to reset the layout system with whatever new text gets 
sent.  Maybe there was a way to work around this, and we can 
investigate it when the time comes.  (An aside, many rendering method 
issues also related to needing to render characters in a grid on 
emacs-20, which of course changes on 21+...)

As for menu handling, the way it's done in Emacs-on-Aqua is not at all 
optimal.  A definite candidate for eventual rewrite, and maybe some of 
the Carbon code will prove useful there (not for the actual API calls, 
but the overall approach).

  reply	other threads:[~2005-09-22 11:53 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-12 18:43 Release timelines and Unicode2 branch Adrian Robert
2005-09-12 19:35 ` Stefan Monnier
2005-09-12 20:36   ` Chong Yidong
2005-09-12 21:28     ` David Kastrup
2005-09-12 21:31     ` Kim F. Storm
2005-09-12 21:37     ` Stefan Monnier
2005-09-13  3:31       ` Eli Zaretskii
2005-09-13  0:47     ` Juanma Barranquero
2005-09-13  5:39     ` Romain Francoise
2005-09-13 17:34       ` Emilio Lopes
2005-09-13 19:52         ` Romain Francoise
2005-09-14 19:58           ` Emilio Lopes
2005-09-15  0:15           ` Chong Yidong
2005-09-14 18:21             ` Romain Francoise
2005-09-13 15:55     ` Richard M. Stallman
2005-09-17 18:22     ` Romain Francoise
2005-09-13 14:26   ` Adrian Robert
2005-09-12 23:22 ` Miles Bader
2005-09-13  0:11   ` Nick Roberts
2005-09-13  1:38     ` Miles Bader
2005-09-13  6:33     ` David Kastrup
2005-09-13 10:14       ` Nick Roberts
2005-09-13 10:44         ` David Kastrup
2005-09-13 11:51         ` Ralf Angeli
2005-09-13 12:03   ` Adrian Robert
2005-09-13 15:55   ` Richard M. Stallman
2005-09-13 16:25     ` Stefan Monnier
2005-09-14 14:07       ` Richard M. Stallman
2005-09-14 14:38       ` Adrian Robert
2005-09-14 15:43         ` Stefan Monnier
2005-09-15 13:00         ` Richard M. Stallman
2005-09-20  0:14           ` Adrian Robert
2005-09-20  5:23             ` David Kastrup
2005-09-21  6:43             ` Richard M. Stallman
2005-09-22  6:03               ` Steven Tamm
2005-09-22 11:53                 ` Adrian Robert [this message]
2005-09-22 15:17                 ` Stefan Monnier
2005-09-23  7:24                 ` Richard M. Stallman
2005-09-13 15:55 ` Richard M. Stallman

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=94db199901ddd1390e7e687f4391530d@cogsci.ucsd.edu \
    --to=arobert@cogsci.ucsd.edu \
    --cc=emacs-devel@gnu.org \
    /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).