help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macintosh character display (128-255)


From: David C.
Subject: Re: Macintosh character display (128-255)
Date: Wed, 29 Dec 2004 14:59:59 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

shamino@techie.com (David C.) writes:
> 
> That being said, I visited the MacOS X Emacs list and used some of
> their postings in conjunction with your advice to come up with this
> addition to .emacs:
> 
>       (set-selection-coding-system 'mac-roman)
>       (set-keyboard-coding-system 'mac-roman)
>       (create-fontset-from-fontset-spec
>        "-apple-courier-medium-r-normal--14-*-*-*-*-*-fontset-david,
> ascii:-apple-courier-medium-r-normal--14-140-75-75-m-140-mac-roman,
> latin-iso8859-1:-apple-courier-medium-r-normal--14-140-75-75-m-140-mac-roman,
> mule-unicode-0100-24ff:-apple-courier-medium-r-normal--14-140-75-75-m-140-mac-roman")
>       (set-frame-font "fontset-david")
>       (standard-display-8bit 128 255)
> 
> This allows hi-page characters generated by programs (like Gnus) to
> be displayed, and I can still see the characters of my test document
> after a find-file.  But I still see squares when I do a insert-file
> into the scratch buffer or a newly-created document buffer.

OK.  I did a bit more work on it.  I realized that your example
posted fontsets for a tremedous number of fonts and sizes.  Since I
only work in one font (courier-14), it could be trimmed way down.

This block seems to solve my problem:

      (set-variable 'default-buffer-file-coding-system 'mac-roman-unix)
      (set-default-coding-systems 'mac-roman-unix)
      (set-selection-coding-system 'mac-roman)
      (set-keyboard-coding-system 'mac-roman)
      (prefer-coding-system 'mac-roman-unix)
      (create-fontset-from-fontset-spec
       "-apple-courier-medium-r-normal--14-*-*-*-*-*-fontset-david,
ascii:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-1:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-2:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-3:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-4:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-5:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-6:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-7:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-8:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-9:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-10:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-13:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-14:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
latin-iso8859-15:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
mac-roman-lower:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
mac-roman-upper:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
mule-unicode-0100-24ff:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
mule-unicode-2500-33ff:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
mule-unicode-e000-ffff:-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman,
iso10646-1::-apple-courier-medium-r-normal--14-*-*-*-*-*-mac-roman"
       t 'noerror)

      (setq default-frame-alist
            (append
             '((width . 80)
               (height . 104)
               (font . "fontset-david"))
               default-frame-alist))

The lack of default coding systems (default-buffer-file-coding-system,
set-default-coding-systems, and prefer-coding-system) were what was
ruining the file-insert operation.

Once I did that, all but four characters rendered.  Adding the font
to the fontset for all the other characters solved that problem.

I still think something like this could be, and should be automated.
The fact that every single code-range uses the same font (and appears
to for most of yours as well) tells me that Emacs should assume this
pattern unless explicitly configured otherwise.  Specifying a font
instead of a fontset should tell Emacs to do what you and I already
did - use that one font for all ranges.  This would make the system
backward-compaible and simple to set up for the majority of users.


> I'll see what I can do here, but I really don't want to spend the
> next month writing thousands of lines of lookup tables in order to do
> this.

Ignore that whine.  I took one look at all you wrote and didn't
realize you had simply provided code for 68 fonts, and that you only
need the ones for those fonts you're actually going to be using.

>> From which of the thousands of fonts can it take the glyphs? Try
>> once: M-x set-frame-font TAB TAB -- and save this buffer for later
>> contemplation!
> 
> I would hope, that after setting a single font for the frame, it
> would realize that I want everything to be displayed according to
> that one font.
> 
> This all was much simpler back in Emacs-19.  Everything was simple
> and obvious before they started forcing users to re-invent the
> wheel.

However, I stand by this gripe.  But there's no need for me to dump
my complaint on you.

Thanks for all your help.

-- David


reply via email to

[Prev in Thread] Current Thread [Next in Thread]