unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: shamino@techie.com (David C.)
Subject: Re: Macintosh character display (128-255)
Date: Wed, 29 Dec 2004 14:59:59 GMT	[thread overview]
Message-ID: <m2hdm540b5.fsf@qqqq.invalid> (raw)
In-Reply-To: m2zmzx2oh5.fsf@qqqq.invalid

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	other threads:[~2004-12-29 14:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-29  9:56 Macintosh character display (128-255) David C.
2004-12-29 10:09 ` kurtz
2004-12-29 10:32 ` Peter Dyballa
     [not found] ` <mailman.9656.1104317240.27204.help-gnu-emacs@gnu.org>
2004-12-29 11:37   ` David C.
2004-12-29 12:26     ` Peter Dyballa
     [not found]     ` <mailman.9707.1104324115.27204.help-gnu-emacs@gnu.org>
2004-12-29 14:00       ` David C.
2004-12-29 14:59         ` David C. [this message]

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=m2hdm540b5.fsf@qqqq.invalid \
    --to=shamino@techie.com \
    /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.
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).