all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* font problem from emacs 23.3 to 23.4???
@ 2012-07-27 13:38 rusi
  2012-07-27 14:45 ` Peter Dyballa
       [not found] ` <mailman.5758.1343400321.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: rusi @ 2012-07-27 13:38 UTC (permalink / raw)
  To: help-gnu-emacs

I have this (quite fragile :-) ) elisp code for running APL under
emacs
http://www.emacswiki.org/emacs/AplInDebian

I just discovered that the fonts are not working in the new setup but
still working in the old
That is I can type in inferior APL in the old
     a ← 2 3 ⍴ ⍳ 6

 and it works

     a
 0 1 2
 3 4 5

It still works in the new but now the ← shows as a box
Also describe-char works on the old but breaks on the new giving

get-char-code-property: Args out of range: [Cc Zs Po Sc Ps Pe Sm Pd Nd
Lu ...], 135

New emacs 23.4.1
Old emacs 23.3.1

I am not sure its an emacs issue or gnome issue whose version is also
different.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font problem from emacs 23.3 to 23.4???
  2012-07-27 13:38 font problem from emacs 23.3 to 23.4??? rusi
@ 2012-07-27 14:45 ` Peter Dyballa
       [not found] ` <mailman.5758.1343400321.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2012-07-27 14:45 UTC (permalink / raw)
  To: rusi; +Cc: help-gnu-emacs


Am 27.07.2012 um 15:38 schrieb rusi:

> I am not sure its an emacs issue or gnome issue whose version is also
> different.

Check things in *scratch* buffer and check them inside an Emacs launched with -Q! You can load packages from inside the *scratch* buffer and also perform some customisation. A minimal set can also be put into an Elisp file and you can launch GNU Emacs as: 'emacs -Q -l <that Elisp file>'.

I launched GNU Emacs 23.4 this way:

	emacs-23.4 -geometry 123x75+27+123 -T 23.4opt --debug-init -fn Lucida Sans Typewriter:autohint=true:antialias=true:size=9

The font is inside Java. The ASCII characters and ← are displayed by Lucida Sans Typewriter, ⍴ and ⍳ by DejaVu Sans Mono. This happens with an automatic fontset. You can set up your own fontset and reserve Unicode ranges for particular fonts which can supply the glyphs.

--
Greetings

  Pete

Imbecility, n.:
	A kind of divine inspiration, or sacred fire affecting censorious critics of this dictionary.
				– Ambrose Bierce: _The Devil's Dictionary_




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font problem from emacs 23.3 to 23.4???
       [not found] ` <mailman.5758.1343400321.855.help-gnu-emacs@gnu.org>
@ 2012-07-27 17:58   ` rusi
  2012-07-27 19:51     ` Peter Dyballa
       [not found]     ` <mailman.5787.1343418712.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: rusi @ 2012-07-27 17:58 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 27, 7:45 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 27.07.2012 um 15:38 schrieb rusi:
>
> > I am not sure its an emacs issue or gnome issue whose version is also
> > different.
>
> Check things in *scratch* buffer and check them inside an Emacs launched with -Q! You can load packages from inside the *scratch* buffer and also perform some customisation. A minimal set can also be put into an Elisp file and you can launch GNU Emacs as: 'emacs -Q -l <that Elisp file>'.
>
> I launched GNU Emacs 23.4 this way:
>
>         emacs-23.4 -geometry 123x75+27+123 -T 23.4opt --debug-init -fn Lucida Sans Typewriter:autohint=true:antialias=true:size=9
>
> The font is inside Java. The ASCII characters and ← are displayed by Lucida Sans Typewriter, ⍴ and ⍳ by DejaVu Sans Mono. This happens with an automatic fontset. You can set up your own fontset and reserve Unicode ranges for particular fonts which can supply the glyphs.
>
> --
> Greetings
>
>   Pete

Thanks Pete for looking at this.

Ok So I  put the cursor on the box which should be an arrow and did
describe-char. I get:

       character: ← (8592, #o20620, #x2190)
preferred charset: unicode (Unicode (ISO10646))
       code point: 0x2190
           syntax: . 	which means: punctuation
         category: .:Base, c:Chinese, h:Korean, j:Japanese
      buffer code: #xE2 #x86 #x90
        file code: #xE2 #x86 #x90 (encoded by coding system utf-8-
unix)
          display: by this font (glyph code)
    xft:-microsoft-Sahadeva-normal-normal-normal-*-12-*-*-*-*-0-
iso10646-1 (#x250)

Character code properties: customize what to show
  name: LEFTWARDS ARROW
  old-name: LEFT ARROW
  general-category: Sm (Symbol, Math)

When I manually set it to deja-vu-sans it works.

So how do I tell xft not to take microsoft-Sahadeva?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font problem from emacs 23.3 to 23.4???
  2012-07-27 17:58   ` rusi
@ 2012-07-27 19:51     ` Peter Dyballa
       [not found]     ` <mailman.5787.1343418712.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2012-07-27 19:51 UTC (permalink / raw)
  To: rusi; +Cc: help-gnu-emacs


Am 27.07.2012 um 19:58 schrieb rusi:

> So how do I tell xft not to take microsoft-Sahadeva?

I think I've found this in the Emacs Wiki (http://www.emacswiki.org):

	If you are content with Emacs' default fonts and just want to change the font for a particular character set; you can use the predefined fontset "fontset-standard" and change only that character set from Lisp:
	
	    ;; Use the predefined fontset "fontset-standard"
	    (set-face-font 'default "fontset-standard")
	
	    ;; In "fontset-standard" use "misc fixed" for the charset
	    ;; `mule-unicode-0100-24ff'
	    (set-fontset-font "fontset-standard"
	                      'mule-unicode-0100-24ff
	                      "-*-fixed-medium-r-*-*-11-*-*-*-*-*-iso10646-1")
	
	You can have even more fine-grained control and make such changes only for a range of characters within an Emacs charset. The following sets characters from the Unicode code charts "Greek and Coptic" and "Greek extended" to `palatino linotype':
	
	    ;; "Greek extended"  U+1F00 - U+1FEF
	    (set-fontset-font "fontset-standard"
	                      (cons (decode-char 'ucs #x1f00)
	                            (decode-char 'ucs #x1fef))
	                      "-*-palatino linotype-*-*-r-*-14-*-*-*-*-*-iso10646-1")
	
	    ;; "Greek and Coptic"  U+0374 - U+03FB
	    (set-fontset-font "fontset-standard"
	                      (cons (decode-char 'ucs #x0374)
	                            (decode-char 'ucs #x03fb))
	                      "-*-palatino linotype-*-*-r-*-14-*-*-*-*-*-iso10646-1")

I think you understand the code and can adapt it to your problem. Otherwise browse through the Emacs Wiki (or the built-in documentation).

--
Greetings

  Pete

Cabbage, n. A familiar kitchen-garden vegetable about as large and wise as a man's head.




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font problem from emacs 23.3 to 23.4???
       [not found]     ` <mailman.5787.1343418712.855.help-gnu-emacs@gnu.org>
@ 2012-07-28  2:35       ` rusi
  2012-07-28  3:11         ` rusi
  2012-07-28  8:18         ` Peter Dyballa
  0 siblings, 2 replies; 8+ messages in thread
From: rusi @ 2012-07-28  2:35 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 28, 12:51 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> I think you understand the code and can adapt it to your problem. Otherwise browse through the
> Emacs Wiki (or the built-in documentation).

Thanks -- Ill try this.
However my direction is the other way round.  I want to make defaults
that 'just work' on more systems without tweaking.  Because otherwise
the code is broken for most people.

In particular, I need a way of saying:
"Get any unicode font (and not a very localised font like sahadeva)"

After that people may tweak the font to their taste.
So I need to understand (probably?) the layer between emacs and the
system (xft?) where automatic font selection happens.

Or... (to explain the mechanics bit):
I have one personal setup (in /home)
There are two OSes which I can boot (Let me call them old and new)
Old works and uses emacs 23.3
New does not and uses 23.4

However much else is 'upgraded.'  And broken -- xft? xfce? xserver?
some specific fonts?
Dont know how to search...

So I thought: Let me mount old OS in new and try running the mounted
emacs23.3.
This way I can check whether the emacs 23.3 -> 23.4 is broken or
something else.

However I get:

$ /mnt/p/usr/bin/emacs23
Warning: arch-dependent data dir (/usr/lib/emacs/23.3/i486-linux-gnu/)
does not exist.
Warning: arch-independent data dir (/usr/share/emacs/23.3/etc/) does
not exist.
Warning: Lisp directory `/usr/local/share/emacs/23.3/site-lisp' does
not exist.
Warning: Lisp directory `/usr/share/emacs/23.3/site-lisp' does not
exist.
Warning: Lisp directory `/usr/share/emacs/23.3/leim' does not exist.
Warning: Lisp directory `/usr/share/emacs/23.3/lisp' does not exist.
Warning: Lisp directory `/usr/share/emacs/23.3/leim' does not exist.
Error: charsets directory (/usr/share/emacs/23.3/etc/charsets) does
not exist.
Emacs will not function correctly without the character map files.
Please check your installation!
Warning: Could not find simple.el nor simple.elc
Cannot open load file: warnings


>
> --
> Greetings
>
>   Pete
>
> Cabbage, n. A familiar kitchen-garden vegetable about as large and wise as a man's head.


Yours cabbagely!


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font problem from emacs 23.3 to 23.4???
  2012-07-28  2:35       ` rusi
@ 2012-07-28  3:11         ` rusi
  2012-07-28  9:14           ` Peter Dyballa
  2012-07-28  8:18         ` Peter Dyballa
  1 sibling, 1 reply; 8+ messages in thread
From: rusi @ 2012-07-28  3:11 UTC (permalink / raw)
  To: help-gnu-emacs

On Jul 28, 7:35 am, rusi <rustompm...@gmail.com> wrote:
> On Jul 28, 12:51 am, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
>
> > I think you understand the code and can adapt it to your problem. Otherwise browse through the
> > Emacs Wiki (or the built-in documentation).
>
> Thanks -- Ill try this.
> However my direction is the other way round.  I want to make defaults
> that 'just work' on more systems without tweaking.  Because otherwise
> the code is broken for most people.
>
> In particular, I need a way of saying:
> "Get any unicode font (and not a very localised font like sahadeva)"
>
> After that people may tweak the font to their taste.
> So I need to understand (probably?) the layer between emacs and the
> system (xft?) where automatic font selection happens.
>
> Or... (to explain the mechanics bit):
> I have one personal setup (in /home)
> There are two OSes which I can boot (Let me call them old and new)
> Old works and uses emacs 23.3
> New does not and uses 23.4
>
> However much else is 'upgraded.'  And broken -- xft? xfce? xserver?
> some specific fonts?
> Dont know how to search...
>
> So I thought: Let me mount old OS in new and try running the mounted
> emacs23.3.
> This way I can check whether the emacs 23.3 -> 23.4 is broken or
> something else.
>
> However I get:
>
> $ /mnt/p/usr/bin/emacs23
> Warning: arch-dependent data dir (/usr/lib/emacs/23.3/i486-linux-gnu/)
> does not exist.
> Warning: arch-independent data dir (/usr/share/emacs/23.3/etc/) does
> not exist.
> Warning: Lisp directory `/usr/local/share/emacs/23.3/site-lisp' does
> not exist.
> Warning: Lisp directory `/usr/share/emacs/23.3/site-lisp' does not
> exist.
> Warning: Lisp directory `/usr/share/emacs/23.3/leim' does not exist.
> Warning: Lisp directory `/usr/share/emacs/23.3/lisp' does not exist.
> Warning: Lisp directory `/usr/share/emacs/23.3/leim' does not exist.
> Error: charsets directory (/usr/share/emacs/23.3/etc/charsets) does
> not exist.
> Emacs will not function correctly without the character map files.
> Please check your installation!
> Warning: Could not find simple.el nor simple.elc
> Cannot open load file: warnings

Ok...
So I softlinked these non-existing 23.3 directories in / to mounted
old ones.
Now emacs23.3 could start.
And I get the same error.

So its not an emacs change that has caused the breakage but something
else outside.

Any thoughts on how to proceed?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font problem from emacs 23.3 to 23.4???
  2012-07-28  2:35       ` rusi
  2012-07-28  3:11         ` rusi
@ 2012-07-28  8:18         ` Peter Dyballa
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2012-07-28  8:18 UTC (permalink / raw)
  To: rusi; +Cc: help-gnu-emacs


Am 28.07.2012 um 04:35 schrieb rusi:

> However much else is 'upgraded.'  And broken -- xft? xfce? xserver?
> some specific fonts?
> Dont know how to search...

Nothing is broken, GNU Emacs just makes progress – and changes a bit its behaviour from release to release. And it seems to change its behaviour even inside a session. The same "exotic" character can be taken from font A the first time and from font B the second time because in-between GNU Emacs performed some garbage collection and cleared the cache partially. It's also possible that the first time I used a text size A and the second time a text size B so that GNU Emacs had to create two different ad-hoc fontsets.

> 
> So I thought: Let me mount old OS in new and try running the mounted
> emacs23.3.
> This way I can check whether the emacs 23.3 -> 23.4 is broken or
> something else.
> 
> However I get:
> 
> $ /mnt/p/usr/bin/emacs23
> Warning: arch-dependent data dir (/usr/lib/emacs/23.3/i486-linux-gnu/)
> does not exist.

Isn't /usr/lib/emacs/23.3 now /mnt/p/usr/lib/emacs/23.3? So a sym-link /usr/lib/emacs/23.3 should be created pointing to /mnt/p/usr/lib/emacs/23.3.

--
Greetings

  Pete

The day Microsoft makes something that doesn't suck is the day they start selling vacuum cleaners.
				– Ernest Jan Plugge




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: font problem from emacs 23.3 to 23.4???
  2012-07-28  3:11         ` rusi
@ 2012-07-28  9:14           ` Peter Dyballa
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2012-07-28  9:14 UTC (permalink / raw)
  To: rusi; +Cc: help-gnu-emacs


Am 28.07.2012 um 05:11 schrieb rusi:

> Now emacs23.3 could start.
> And I get the same error.
> 
> So its not an emacs change that has caused the breakage but something
> else outside.

When I understand you correctly then you are using now a different OS (release). That one can have slightly different font services, because the two releases don't have the same fonts installed and might also have different setup files for the font services. On Linux you have two different font services: one related to the X server, based on 'xset fp' and used by xlsfonts, xfontsel, xfd, and some user-side font service, based on libfontconfig. This service uses files like fonts.conf or ~ /.fonts.conf and can be accessed via fc-cache, fc-list, fc-match.

GNU Emacs might need at one moment a mono-spaced character from the Unicode Arrows block at a particular size and with the features normal weight and upright. It asks the font service: “Gimme that thing!” Or it better asks for the whole block with that character to insert it completely into the active ad-hoc fontset. That's approximately how font handling in GNU Emacs recently works.

To become independent from coincidence you'd need to check whether a font with some properties (glyphs, features like spacing, width, weight, etc.) exists. Then make your choice of fonts and build the fontset.

--
Greetings

  Pete

     _o    o         o   o
   _<<     \\_/\_,   \\_ \\_/\_,
  (*)/(*) (*)   (*) (*) `-    (*)




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-07-28  9:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-27 13:38 font problem from emacs 23.3 to 23.4??? rusi
2012-07-27 14:45 ` Peter Dyballa
     [not found] ` <mailman.5758.1343400321.855.help-gnu-emacs@gnu.org>
2012-07-27 17:58   ` rusi
2012-07-27 19:51     ` Peter Dyballa
     [not found]     ` <mailman.5787.1343418712.855.help-gnu-emacs@gnu.org>
2012-07-28  2:35       ` rusi
2012-07-28  3:11         ` rusi
2012-07-28  9:14           ` Peter Dyballa
2012-07-28  8:18         ` Peter Dyballa

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.