From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xiao-Yong Jin Newsgroups: gmane.emacs.help Subject: How to define a font size relative to the default Date: Fri, 06 Mar 2009 07:48:07 -0500 Message-ID: <87d4cuddh4.fsf@columbia.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1236343804 25010 80.91.229.12 (6 Mar 2009 12:50:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 6 Mar 2009 12:50:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 06 13:51:21 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LfZWK-0005UH-2I for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Mar 2009 13:51:20 +0100 Original-Received: from localhost ([127.0.0.1]:34462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfZUz-0002WX-1E for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Mar 2009 07:49:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfZTo-0001vl-ND for help-gnu-emacs@gnu.org; Fri, 06 Mar 2009 07:48:44 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfZTn-0001uL-PL for help-gnu-emacs@gnu.org; Fri, 06 Mar 2009 07:48:44 -0500 Original-Received: from [199.232.76.173] (port=58521 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfZTn-0001tz-KG for help-gnu-emacs@gnu.org; Fri, 06 Mar 2009 07:48:43 -0500 Original-Received: from serrano.cc.columbia.edu ([128.59.29.6]:57654) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LfZTm-0004M8-UA for help-gnu-emacs@gnu.org; Fri, 06 Mar 2009 07:48:43 -0500 Original-Received: from lattice (latticeqcd.phys.columbia.edu [128.59.169.70]) (user=xj2106 mech=PLAIN bits=0) by serrano.cc.columbia.edu (8.14.3/8.14.1) with ESMTP id n26CmZ3A002864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Fri, 6 Mar 2009 07:48:36 -0500 (EST) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAD1BMVEXcBwj0AgP8AADrysTUU1gp luy9AAACUklEQVQ4jW1U0bHjIAwUhgIs2QUYzgXgEQWYiP5ruhVO8u7NnD4yxMsirVZA2st/4jCq 2RdZfn2Xkig8y8y/oJyJh0dIqm0phQv+B2wrlE0R1X8DSCsWDadkyishmjJLzrzj6zoRYt9bWxM/ OM1vYHWh3CbDhux84DsjgDCAhOQtat+W4046ow4HIlad9yuGLHHWOHpGDhzFTPd52VKy0QzOMssN ueleDfn1fRQYZaX4WptZUwc+R0H5zbEDwD4I1sC0ojKBcpXYrG6pNjn0E21BjgVlXdu4msy+WfNf IbE73mkCaFDgsr2QFk0sLkOvOC6Fcq0AvNCFJH4YKkyksr32Nm75MtIFHbnEZXv96SgcOZDOqgMw agLIUtyoAB3V0hWXIhzDBESmDheINMs/OgAM3nseY+17OOwLMBVGK+GvGyTPrHDObm106x96STAm SxJMC3RgFHMaOqwjh/uJFt8ZOi7Uj/4t8dob6dtcCNzQtJtJg73OKkZo4xgE4PQNc99y1mL2ZZz6 7vUtp3ZLdqNjhO4eGoo7hxE/Mapg3FMgSpUJQMZem5GNgLregDuACk4AP4zDp2OfyZ0BHTStnYAw Zj72/WHom9HmXZK8XQD0Ue6Ms1Egb95k6DqBUN4CKzjmOTQ+RwHYPoAnV33GGsplqy4BJWvYa1Tj 7GkEfrz8MrsnYBxq4uZUWOvAvNqeI2tc1uYDCUb3ozBShqpYY8B1vQVG7Z/ksZ+KEUPngBQK8wVw wIdF+0CbOUF5z3M+/JaLL9ifmIwWtZ/HxWGR5zGyv9F0pEDk9NRcAAAAAElFTkSuQmCC Mail-Followup-To: help-gnu-emacs@gnu.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.65 on 128.59.29.6 X-detected-operating-system: by monty-python.gnu.org: Solaris 9 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62674 Archived-At: 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/* <\ * (__ */\ <