* How to define a font size relative to the default
@ 2009-03-06 12:48 Xiao-Yong Jin
0 siblings, 0 replies; only message in thread
From: Xiao-Yong Jin @ 2009-03-06 12:48 UTC (permalink / raw)
To: help-gnu-emacs
Hi, I'm using Emacs checked out from cvs.
`GNU Emacs 23.0.91.1 (x86_64-unknown-linux-gnu, GTK+ Version
2.14.7) of 2009-03-02 on lattice'
I let Emacs use the fontset defined in ~/.Xdefaults as
Emacs.font: Envy Code R-10
Since `Envy Code R' doesn't cover all the code point, I use
set-fontset-font to add an default fallback font with
(set-fontset-font
(fontset (frame-parameter nil 'font))
nil "DejaVu Sans Mono" nil 'append)
But `DejaVu Sans Mono' turns out to be wider than `Envy Code
R'. So I decided to make it smaller by adding an explicit
font size as
(set-fontset-font
(fontset (frame-parameter nil 'font))
nil "DejaVu Sans Mono-9" nil 'append)
And it worked. Two fonts have the same width.
However, it turns out that Emacs is no longer able to change
the font size of `DejaVu Sans Mono'. For example, in LaTeX
mode, all instance of letters using `DejaVu Sans Mono' has
the same size, while those using the default `Envy Code R'
change according to the structure; and in text-scale-mode,
letters using `Envy Code R' can change with
text-scale-adjust, but those with `DejaVu Sans Mono' can't.
So, I guess by explicitly specify the font size in
set-fontset-font fixes the font size and there is no other
way to change it.
Can I specify a font size always to be relative to the
default? Like in face attribute, there is `scale' in
`Height'. Can I use something similar in set-fontset-font?
I guess usually we want the width of the fonts to be the
same in an editor. But why does Emacs default to balance
the height of the font?
It also happens in CJK characters where people usually want
to make a character twice as wide as a Latin letter to make
things align correctly. But as the problem layout above, it
is not an easy task in Emacs.
Is there a solution?
Best,
Xiao-Yong
--
c/* __o/*
<\ * (__
*/\ <
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-03-06 12:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-06 12:48 How to define a font size relative to the default Xiao-Yong Jin
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.