all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* font size
@ 2002-04-23 16:24 Arash Bijanzadeh
  2002-04-24  6:25 ` G Anna
  0 siblings, 1 reply; 25+ messages in thread
From: Arash Bijanzadeh @ 2002-04-23 16:24 UTC (permalink / raw)


Hello ecerybody!
I wanna know if it is possible to change the font size in the X client 
of emacs? and how? please help me!

-- 
 ,           , 
 /             \ 
((__-^^-,-^^-__)) 
 `-_---' `---_-' 
  `--|o` 'o|--' 
     \  `  / 
      ): :( 
      :o_o: 
       "-" 
A.bejan

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

* Re: font size
  2002-04-23 16:24 Arash Bijanzadeh
@ 2002-04-24  6:25 ` G Anna
  0 siblings, 0 replies; 25+ messages in thread
From: G Anna @ 2002-04-24  6:25 UTC (permalink / raw)
  Cc: help-gnu-emacs


> Date: Tue, 23 Apr 2002 20:54:23 +0430
> From: Arash Bijanzadeh <a.bijanzadeh@linuxiran.org>
> Subj: font size
> 
> Hello ecerybody!
> I wanna know if it is possible to change the font size in the X client 
> of emacs? and how? please help me!

In your ~/.emacs add the following lines.  Remember to choose an
appropriate font.

(setq default-frame-alist
      '((width . 80)
	(height . 40)
	(font . "-misc-fixed-medium-r-normal--15-120-100-100-c-90-iso8859-1")
	(background-color . "black")
	(foreground-color . "light blue")
	(menu-bar-lines . 1)))

Also try shift+left-mouse-button to get the font menu.

HTH

anna

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

* font size
@ 2002-07-10 13:36 Massimo Alonzo
  0 siblings, 0 replies; 25+ messages in thread
From: Massimo Alonzo @ 2002-07-10 13:36 UTC (permalink / raw)


Hi all,

how can I increase fonts size for my Latex/Fortran documents?


Thank you
Massimo

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

* font size
@ 2005-07-29  4:24 Baloff
  2005-07-29  8:46 ` Peter Dyballa
                   ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Baloff @ 2005-07-29  4:24 UTC (permalink / raw)



Hello
I am trying to change the font size.
after reading in info info on how to seach the info. I was able to
find in info emacs ps-font-size should do it.

but when I type ps<tab> in the mini buffer I get

Possible completions are:
ps-despool			   ps-line-lengths
ps-mode				   ps-nb-pages-buffer
ps-nb-pages-region		   ps-print-buffer
ps-print-buffer-with-faces	   ps-print-customize
ps-print-region			   ps-print-region-with-faces
ps-spool-buffer			   ps-spool-buffer-with-faces
ps-spool-region			   ps-spool-region-with-faces

nothing about font size. 

help please

thanks

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

* Re: font size
  2005-07-29  4:24 font size Baloff
@ 2005-07-29  8:46 ` Peter Dyballa
  2005-07-29 14:07 ` Eli Zaretskii
       [not found] ` <mailman.2046.1122646597.20277.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 25+ messages in thread
From: Peter Dyballa @ 2005-07-29  8:46 UTC (permalink / raw)



Am 29.07.2005 um 06:24 schrieb Baloff:

> I am trying to change the font size.
>

Try S-down-mouse-1 or M-x mouse-set-font!

--
Greetings

   Pete

Without vi there is only GNU Emacs



--
Mit friedvollen Grüßen

   Pete

Mit Jazz statt Bomben gegen die Taliban!

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

* Re: font size
  2005-07-29  4:24 font size Baloff
  2005-07-29  8:46 ` Peter Dyballa
@ 2005-07-29 14:07 ` Eli Zaretskii
       [not found] ` <mailman.2046.1122646597.20277.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 25+ messages in thread
From: Eli Zaretskii @ 2005-07-29 14:07 UTC (permalink / raw)


> From: Baloff <washdc@wash.edu>
> Date: 29 Jul 2005 14:24:37 +1000
> 
> I am trying to change the font size.
> after reading in info info on how to seach the info. I was able to
> find in info emacs ps-font-size should do it.
> 
> but when I type ps<tab> in the mini buffer I get
> 
> Possible completions are:
> ps-despool			   ps-line-lengths
> ps-mode				   ps-nb-pages-buffer
> ps-nb-pages-region		   ps-print-buffer
> ps-print-buffer-with-faces	   ps-print-customize
> ps-print-region			   ps-print-region-with-faces
> ps-spool-buffer			   ps-spool-buffer-with-faces
> ps-spool-region			   ps-spool-region-with-faces
> 
> nothing about font size. 

Try loading ps-print first, like this:

    M-x load-library RET ps-print RET

and then try typing "ps TAB" again.

(Some variables are only defined when the respective package is loaded
into Emacs.)

Btw, ps-font-size is only for the ps-print feature, it will not affect
the fonts used for display.  Are you sure this is what you need?

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

* Re: font size
       [not found] ` <mailman.2046.1122646597.20277.help-gnu-emacs@gnu.org>
@ 2005-07-30 10:15   ` Baloff
  2005-07-30 10:50     ` Peter Dyballa
                       ` (2 more replies)
  0 siblings, 3 replies; 25+ messages in thread
From: Baloff @ 2005-07-30 10:15 UTC (permalink / raw)


Eli Zaretskii <eliz@gnu.org> writes:

> > From: Baloff <washdc@wash.edu>
> > Date: 29 Jul 2005 14:24:37 +1000
> > 
> > I am trying to change the font size.
> > after reading in info info on how to seach the info. I was able to
> > find in info emacs ps-font-size should do it.
> > 
> > but when I type ps<tab> in the mini buffer I get
> > 
> > Possible completions are:
> > ps-despool			   ps-line-lengths
> > ps-mode				   ps-nb-pages-buffer
> > ps-nb-pages-region		   ps-print-buffer
> > ps-print-buffer-with-faces	   ps-print-customize
> > ps-print-region			   ps-print-region-with-faces
> > ps-spool-buffer			   ps-spool-buffer-with-faces
> > ps-spool-region			   ps-spool-region-with-faces
> > 
> > nothing about font size. 
> 
> Try loading ps-print first, like this:
> 
>     M-x load-library RET ps-print RET
> 
> and then try typing "ps TAB" again.
> 
> (Some variables are only defined when the respective package is loaded
> into Emacs.)
> 
> Btw, ps-font-size is only for the ps-print feature, it will not affect
> the fonts used for display.  Are you sure this is what you need?

I am trying to increase the font size displayed on the screen. plus I
don't know what S-down-mouse-1 or M-x mouse-set-font! mean.
what is S-down-mouse-1 any way?

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

* Re: font size
  2005-07-30 10:15   ` Baloff
@ 2005-07-30 10:50     ` Peter Dyballa
  2005-07-30 11:02     ` Eli Zaretskii
  2005-07-30 16:16     ` Tim X
  2 siblings, 0 replies; 25+ messages in thread
From: Peter Dyballa @ 2005-07-30 10:50 UTC (permalink / raw)



Am 30.07.2005 um 12:15 schrieb Baloff:

> what is S-down-mouse-1 any way?
>

You press the shift key and while holding it down you press usually the 
left-most mouse button. Then you can let go both keys.

Or you type C-h t.

--
Greetings

   Pete

Bake Pizza not war!

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

* Re: font size
  2005-07-30 10:15   ` Baloff
  2005-07-30 10:50     ` Peter Dyballa
@ 2005-07-30 11:02     ` Eli Zaretskii
  2005-07-30 16:16     ` Tim X
  2 siblings, 0 replies; 25+ messages in thread
From: Eli Zaretskii @ 2005-07-30 11:02 UTC (permalink / raw)


> From: Baloff <washdc@wash.edu>
> Date: 30 Jul 2005 20:15:38 +1000
> 
> I am trying to increase the font size displayed on the screen.

Then the ps-* stuff is not what you want.

> plus I don't know what S-down-mouse-1 or M-x mouse-set-font! mean.
> what is S-down-mouse-1 any way?

S-down-mouse-1 means hold the Shift key and click the left mouse
button.

Sounds like you need to read the tutorial and the few basic chapters
of the manual.  The node "Mouse Commands" is one that I recommend.

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

* Re: font size
  2005-07-30 10:15   ` Baloff
  2005-07-30 10:50     ` Peter Dyballa
  2005-07-30 11:02     ` Eli Zaretskii
@ 2005-07-30 16:16     ` Tim X
  2 siblings, 0 replies; 25+ messages in thread
From: Tim X @ 2005-07-30 16:16 UTC (permalink / raw)


Baloff <washdc@wash.edu> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > > From: Baloff <washdc@wash.edu>
> > > Date: 29 Jul 2005 14:24:37 +1000
> > > 
> > > I am trying to change the font size.
> > > after reading in info info on how to seach the info. I was able to
> > > find in info emacs ps-font-size should do it.
> > > 
> > > but when I type ps<tab> in the mini buffer I get
> > > 
> > > Possible completions are:
> > > ps-despool			   ps-line-lengths
> > > ps-mode				   ps-nb-pages-buffer
> > > ps-nb-pages-region		   ps-print-buffer
> > > ps-print-buffer-with-faces	   ps-print-customize
> > > ps-print-region			   ps-print-region-with-faces
> > > ps-spool-buffer			   ps-spool-buffer-with-faces
> > > ps-spool-region			   ps-spool-region-with-faces
> > > 
> > > nothing about font size. 
> > 
> > Try loading ps-print first, like this:
> > 
> >     M-x load-library RET ps-print RET
> > 
> > and then try typing "ps TAB" again.
> > 
> > (Some variables are only defined when the respective package is loaded
> > into Emacs.)
> > 
> > Btw, ps-font-size is only for the ps-print feature, it will not affect
> > the fonts used for display.  Are you sure this is what you need?
> 
> I am trying to increase the font size displayed on the screen. plus I
> don't know what S-down-mouse-1 or M-x mouse-set-font! mean.
> what is S-down-mouse-1 any way?
> 

Firstly, I'd recommend reading the tutorial C-h t (Control and h
together then t). Also check out the info pages on emacs. 

In emacs, font related stuff is covered by the term 'face'. Try M-x
customize-face <ret> (where M-x means hit Meta plus x and Meta is
*usually* the Alt key)

If your running on Linux under X, you can also use X resource settings
(see info pages). You can also set the font on the command line with
-font. 

Tim

-- 
Tim Cross
The e-mail address on this message is FALSE (obviously!). My real e-mail is
to a company in Australia called rapttech and my login is tcross - if you 
really need to send mail, you should be able to work it out!

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

* Re: Font size
  2021-08-04 13:45   ` Eli Zaretskii
@ 2021-08-04 13:58     ` Kévin Le Gouguec
  2021-08-04 15:46       ` Yuri Khan
  0 siblings, 1 reply; 25+ messages in thread
From: Kévin Le Gouguec @ 2021-08-04 13:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: masm+emacs, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> One hiccup: unless I'm mistaken, this build does not consult
>> ~/.Xresources anymore.
>
> That's by design, AFAIU.  Yuuki even said that not so long ago.

Right.  To recap my other questions:

1. Why do Xresources and GSettings sizes differ from what C-u C-x =
   reports?

2. Why doesn't "10.5" work with GSettings, despite it working with
   Xresources?

3. Is there a bug to report there?



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

* Re: Font size
  2021-08-04 13:55   ` Font size (was: Merging the pgtk branch) Eli Zaretskii
@ 2021-08-04 14:15     ` Kévin Le Gouguec
  0 siblings, 0 replies; 25+ messages in thread
From: Kévin Le Gouguec @ 2021-08-04 14:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: masm+emacs, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Kévin Le Gouguec <kevin.legouguec@gmail.com>
>> Date: Wed, 04 Aug 2021 14:53:04 +0200
>> Cc: Yuuki Harano <masm+emacs@masm11.me>, Eli Zaretskii <eliz@gnu.org>
>> 
>> $ gsettings set org.gnome.desktop.interface monospace-font-name 'DejaVu Sans Mono 10.5'
>> 
>> Emacs emits a warning:
>> 
>> > set-face-attribute: Font not available: #<font-spec nil nil DejaVu\
>> > Sans\ Mono\ 10\.5 nil nil nil nil nil nil nil nil nil ((:name
>> > . "DejaVu Sans Mono 10.5") (:user-spec . "DejaVu Sans Mono 10.5"))>
>> 
>> Is this expected?
>
> I don't know if it's expected, but the error message says that the
> "10.5" part is not expected there.  What happens if you use "10"
> instead of "10.5"?

Cf. the paragraph just above:

> On master --with-gconf and feature/pgtk, with font-use-system-font set
> to t, here is what C-u C-x = says for various GSettings:
> 
> GSettings³      C-u C-x =
> 9               12
> 10              13
> 10.5            ERROR (see below)
> 11              15
> 
> ³ "XX" in "gsettings org.gnome.desktop.interface monospace-font-name 'DejaVu Sans Mono XX'"

What I don't understand:

1. How come GSettings/Xresources and Emacs use different "units"?
   (Apologies if the answer lies somewhere in the manual, which it most
   certainly does)

2. Why does 10.5 work with Xresources and not GSettings?



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

* Re: Font size
  2021-08-04 13:58     ` Font size Kévin Le Gouguec
@ 2021-08-04 15:46       ` Yuri Khan
  2021-08-04 16:11         ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Yuri Khan @ 2021-08-04 15:46 UTC (permalink / raw)
  To: Kévin Le Gouguec; +Cc: Eli Zaretskii, masm+emacs, Emacs developers

On Wed, 4 Aug 2021 at 20:59, Kévin Le Gouguec <kevin.legouguec@gmail.com> wrote:
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> One hiccup: unless I'm mistaken, this build does not consult
> >> ~/.Xresources anymore.
> >
> > That's by design, AFAIU.  Yuuki even said that not so long ago.
>
> Right.  To recap my other questions:
>
> 1. Why do Xresources and GSettings sizes differ from what C-u C-x =
>    reports?

Likely because the former are specified in points (1 pt = 1/72 in) and
the latter in pixels (1 px = 1/96 in by default).



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

* Re: Font size
  2021-08-04 15:46       ` Yuri Khan
@ 2021-08-04 16:11         ` Eli Zaretskii
  2021-08-04 17:09           ` Yuri Khan
  0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2021-08-04 16:11 UTC (permalink / raw)
  To: Yuri Khan; +Cc: masm+emacs, emacs-devel, kevin.legouguec

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Wed, 4 Aug 2021 22:46:25 +0700
> Cc: Eli Zaretskii <eliz@gnu.org>, masm+emacs@masm11.me, 
> 	Emacs developers <emacs-devel@gnu.org>
> 
> > 1. Why do Xresources and GSettings sizes differ from what C-u C-x =
> >    reports?
> 
> Likely because the former are specified in points (1 pt = 1/72 in) and
> the latter in pixels (1 px = 1/96 in by default).

is this tru also for GSettings font sizes in the X+GTK build of Emacs?
Because then we'd need to document that in the "Fonts" section of the
Emacs manual, where all the different methods of specifying a font are
described.



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

* Re: Font size
  2021-08-04 16:11         ` Eli Zaretskii
@ 2021-08-04 17:09           ` Yuri Khan
  2021-08-04 18:23             ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Yuri Khan @ 2021-08-04 17:09 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: masm+emacs, Emacs developers, Kévin Le Gouguec

On Wed, 4 Aug 2021 at 23:11, Eli Zaretskii <eliz@gnu.org> wrote:

> > > 1. Why do Xresources and GSettings sizes differ from what C-u C-x =
> > >    reports?
> >
> > Likely because the former are specified in points (1 pt = 1/72 in) and
> > the latter in pixels (1 px = 1/96 in by default).
>
> is this tru also for GSettings font sizes in the X+GTK build of Emacs?
> Because then we'd need to document that in the "Fonts" section of the
> Emacs manual, where all the different methods of specifying a font are
> described.

The org.gnome.desktop.interface GSettings schema does not say
explicitly which units the size is specified in, and whether
fractional values are allowed.

    <key name="font-name" type="s">
      <default>'Cantarell 11'</default>
      <summary>Default font</summary>
      <description>
        Name of the default font used by gtk+.
      </description>
    </key>
    <key name="document-font-name" type="s">
      <default>'Cantarell 11'</default>
      <summary>Document font</summary>
      <description>
        Name of the default font used for reading documents.
      </description>
    </key>
    <key name="monospace-font-name" type="s">
      <default>'Source Code Pro 10'</default>
      <summary>Monospace font</summary>
      <description>
        Name of a monospaced (fixed-width) font for use in locations like
        terminals.
      </description>
    </key>



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

* Re: Font size
  2021-08-04 17:09           ` Yuri Khan
@ 2021-08-04 18:23             ` Eli Zaretskii
  2021-08-04 18:33               ` Yuri Khan
  0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2021-08-04 18:23 UTC (permalink / raw)
  To: Yuri Khan; +Cc: masm+emacs, emacs-devel, kevin.legouguec

> From: Yuri Khan <yuri.v.khan@gmail.com>
> Date: Thu, 5 Aug 2021 00:09:47 +0700
> Cc: Kévin Le Gouguec <kevin.legouguec@gmail.com>, 
> 	masm+emacs@masm11.me, Emacs developers <emacs-devel@gnu.org>
> 
> On Wed, 4 Aug 2021 at 23:11, Eli Zaretskii <eliz@gnu.org> wrote:
> 
> > > > 1. Why do Xresources and GSettings sizes differ from what C-u C-x =
> > > >    reports?
> > >
> > > Likely because the former are specified in points (1 pt = 1/72 in) and
> > > the latter in pixels (1 px = 1/96 in by default).
> >
> > is this tru also for GSettings font sizes in the X+GTK build of Emacs?
> > Because then we'd need to document that in the "Fonts" section of the
> > Emacs manual, where all the different methods of specifying a font are
> > described.
> 
> The org.gnome.desktop.interface GSettings schema does not say
> explicitly which units the size is specified in, and whether
> fractional values are allowed.

My question was whether the same units are likely to be used in the
X+GTK build as they are in the PGTK build.  IOW, that your guess of
the units being 1/96 inch is true or false for both of them.



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

* Re: Font size
  2021-08-04 18:23             ` Eli Zaretskii
@ 2021-08-04 18:33               ` Yuri Khan
  2021-08-05 14:51                 ` Robert Pluim
  0 siblings, 1 reply; 25+ messages in thread
From: Yuri Khan @ 2021-08-04 18:33 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: masm+emacs, Emacs developers, Kévin Le Gouguec

On Thu, 5 Aug 2021 at 01:24, Eli Zaretskii <eliz@gnu.org> wrote:

> My question was whether the same units are likely to be used in the
> X+GTK build as they are in the PGTK build.  IOW, that your guess of
> the units being 1/96 inch is true or false for both of them.

I’m not related to GNOME or GTK+ development, but I would be much
surprised if font sizes were specified in anything other than points
(which are 1/72 in, not 1/96 in); and especially if GTK behaved
differently in that regard between X and Wayland and/or depended on
other factors other than poorly configured screen DPI.



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

* Re: Font size
  2021-08-04 18:33               ` Yuri Khan
@ 2021-08-05 14:51                 ` Robert Pluim
  2021-08-05 16:19                   ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Robert Pluim @ 2021-08-05 14:51 UTC (permalink / raw)
  To: Yuri Khan
  Cc: Eli Zaretskii, Kévin Le Gouguec, masm+emacs,
	Emacs developers

>>>>> On Thu, 5 Aug 2021 01:33:16 +0700, Yuri Khan <yuri.v.khan@gmail.com> said:

    Yuri> On Thu, 5 Aug 2021 at 01:24, Eli Zaretskii <eliz@gnu.org> wrote:
    >> My question was whether the same units are likely to be used in the
    >> X+GTK build as they are in the PGTK build.  IOW, that your guess of
    >> the units being 1/96 inch is true or false for both of them.

    Yuri> I’m not related to GNOME or GTK+ development, but I would be much
    Yuri> surprised if font sizes were specified in anything other than points
    Yuri> (which are 1/72 in, not 1/96 in); and especially if GTK behaved
    Yuri> differently in that regard between X and Wayland and/or depended on
    Yuri> other factors other than poorly configured screen DPI.

Fontconfig talks about sizes in points (but allows them to be
fractional, the underlying data type is a double)

Robert
-- 



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

* Re: Font size
  2021-08-05 14:51                 ` Robert Pluim
@ 2021-08-05 16:19                   ` Eli Zaretskii
  0 siblings, 0 replies; 25+ messages in thread
From: Eli Zaretskii @ 2021-08-05 16:19 UTC (permalink / raw)
  To: Robert Pluim; +Cc: masm+emacs, emacs-devel, kevin.legouguec, yuri.v.khan

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  masm+emacs@masm11.me,  Emacs developers
>  <emacs-devel@gnu.org>,  Kévin Le Gouguec
>  <kevin.legouguec@gmail.com>
> Date: Thu, 05 Aug 2021 16:51:57 +0200
> 
> >>>>> On Thu, 5 Aug 2021 01:33:16 +0700, Yuri Khan <yuri.v.khan@gmail.com> said:
> 
>     Yuri> On Thu, 5 Aug 2021 at 01:24, Eli Zaretskii <eliz@gnu.org> wrote:
>     >> My question was whether the same units are likely to be used in the
>     >> X+GTK build as they are in the PGTK build.  IOW, that your guess of
>     >> the units being 1/96 inch is true or false for both of them.
> 
>     Yuri> I’m not related to GNOME or GTK+ development, but I would be much
>     Yuri> surprised if font sizes were specified in anything other than points
>     Yuri> (which are 1/72 in, not 1/96 in); and especially if GTK behaved
>     Yuri> differently in that regard between X and Wayland and/or depended on
>     Yuri> other factors other than poorly configured screen DPI.
> 
> Fontconfig talks about sizes in points (but allows them to be
> fractional, the underlying data type is a double)

I wasn't talking about the Fontconfig format of specifying a font, I
was talking about the GTK format.  They are different, see the node
"Fonts" in the Emacs manual.



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

* Font size
@ 2024-08-20  5:25 Anand Tamariya
  2024-08-20 12:11 ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Tamariya @ 2024-08-20  5:25 UTC (permalink / raw)
  To: Emacs Devel

[-- Attachment #1: Type: text/plain, Size: 565 bytes --]

Why does this API keep increasing the font size? With a selection, try the
test command.

Alternatively, what's the best way to query the font-size at point and
re-apply using face property?


font-info
[ OPENED-NAME FULL-NAME SIZE *HEIGHT* BASELINE-OFFSET RELATIVE-COMPOSE
    DEFAULT-ASCENT MAX-WIDTH ASCENT DESCENT SPACE-WIDTH AVERAGE-WIDTH
    FILENAME CAPABILITY ]

(defun test(start end)
  (interactive "r")
  (let* ((size (* 10 (aref (font-info (font-at start)) 3))))
    (put-text-property start end 'face
      (list :inherit 'unspecified :height size))))

[-- Attachment #2: Type: text/html, Size: 776 bytes --]

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

* Re: Font size
  2024-08-20  5:25 Font size Anand Tamariya
@ 2024-08-20 12:11 ` Eli Zaretskii
  2024-08-20 12:56   ` Anand Tamariya
  0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2024-08-20 12:11 UTC (permalink / raw)
  To: Anand Tamariya; +Cc: emacs-devel

> From: Anand Tamariya <atamariya@gmail.com>
> Date: Tue, 20 Aug 2024 10:55:45 +0530
> 
> Why does this API keep increasing the font size? With a selection, try the test command.

Because the factor of 10 is wrong, AFAIU.

> Alternatively, what's the best way to query the font-size at point and re-apply using face property?

I don't understand: if you don't want to change the height, then why
do you have :height in the face spec at all?

In any case, :height could be a relative value of 1.0.



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

* Re: Font size
  2024-08-20 12:11 ` Eli Zaretskii
@ 2024-08-20 12:56   ` Anand Tamariya
  2024-08-20 13:17     ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Tamariya @ 2024-08-20 12:56 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

> Why does this API keep increasing the font size? With a selection, try
> the test command.
>
> Because the factor of 10 is wrong, AFAIU.
>
Factor of 1 decreases the font size.

> Alternatively, what's the best way to query the font-size at point and
> re-apply using face property?
>
> I don't understand: if you don't want to change the height, then why
> do you have :height in the face spec at all?
>
> In any case, :height could be a relative value of 1.0.
>
 I'm trying to increase/decrease the font size in the selected region. So I
need a base value to work with.

[-- Attachment #2: Type: text/html, Size: 1016 bytes --]

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

* Re: Font size
  2024-08-20 12:56   ` Anand Tamariya
@ 2024-08-20 13:17     ` Eli Zaretskii
  2024-08-20 13:37       ` Anand Tamariya
  0 siblings, 1 reply; 25+ messages in thread
From: Eli Zaretskii @ 2024-08-20 13:17 UTC (permalink / raw)
  To: Anand Tamariya; +Cc: emacs-devel

> From: Anand Tamariya <atamariya@gmail.com>
> Date: Tue, 20 Aug 2024 18:26:15 +0530
> Cc: emacs-devel@gnu.org
> 
> 
>  > Why does this API keep increasing the font size? With a selection, try the test command.
> 
>  Because the factor of 10 is wrong, AFAIU.
> 
> Factor of 1 decreases the font size. 

Yes, because 1 is also wrong.

>  > Alternatively, what's the best way to query the font-size at point and re-apply using face property?
> 
>  I don't understand: if you don't want to change the height, then why
>  do you have :height in the face spec at all?
> 
>  In any case, :height could be a relative value of 1.0.
> 
>  I'm trying to increase/decrease the font size in the selected region. So I need a base value to work with.

And relative values like 1.2 or 0.8 don't fit the bill in your case?
Using relative sizes frees you from the need to compute absolute size
values.



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

* Re: Font size
  2024-08-20 13:17     ` Eli Zaretskii
@ 2024-08-20 13:37       ` Anand Tamariya
  2024-08-20 13:52         ` Eli Zaretskii
  0 siblings, 1 reply; 25+ messages in thread
From: Anand Tamariya @ 2024-08-20 13:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 367 bytes --]

> >  I'm trying to increase/decrease the font size in the selected region.
> So I need a base value to work with.
>
> And relative values like 1.2 or 0.8 don't fit the bill in your case?
> Using relative sizes frees you from the need to compute absolute size
> values.
>
I'm exploring a scenario where the text is inside a fixed shape. So
absolute size is important.

[-- Attachment #2: Type: text/html, Size: 623 bytes --]

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

* Re: Font size
  2024-08-20 13:37       ` Anand Tamariya
@ 2024-08-20 13:52         ` Eli Zaretskii
  0 siblings, 0 replies; 25+ messages in thread
From: Eli Zaretskii @ 2024-08-20 13:52 UTC (permalink / raw)
  To: Anand Tamariya; +Cc: emacs-devel

> From: Anand Tamariya <atamariya@gmail.com>
> Date: Tue, 20 Aug 2024 19:07:33 +0530
> Cc: emacs-devel@gnu.org
> 
>  >  I'm trying to increase/decrease the font size in the selected region. So I need a base value to work
>  with.
> 
>  And relative values like 1.2 or 0.8 don't fit the bill in your case?
>  Using relative sizes frees you from the need to compute absolute size
>  values.
> 
> I'm exploring a scenario where the text is inside a fixed shape. So absolute size is important. 

Not sure I understand why float values don't do what you want, but you
could find the right value of the factor empirically.  In my case, I
found that 6 is the right value.



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

end of thread, other threads:[~2024-08-20 13:52 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20  5:25 Font size Anand Tamariya
2024-08-20 12:11 ` Eli Zaretskii
2024-08-20 12:56   ` Anand Tamariya
2024-08-20 13:17     ` Eli Zaretskii
2024-08-20 13:37       ` Anand Tamariya
2024-08-20 13:52         ` Eli Zaretskii
  -- strict thread matches above, loose matches on Subject: below --
2021-08-01  8:53 Merging the pgtk branch Eli Zaretskii
2021-08-04 12:53 ` Font size (was: Merging the pgtk branch) Kévin Le Gouguec
2021-08-04 13:45   ` Eli Zaretskii
2021-08-04 13:58     ` Font size Kévin Le Gouguec
2021-08-04 15:46       ` Yuri Khan
2021-08-04 16:11         ` Eli Zaretskii
2021-08-04 17:09           ` Yuri Khan
2021-08-04 18:23             ` Eli Zaretskii
2021-08-04 18:33               ` Yuri Khan
2021-08-05 14:51                 ` Robert Pluim
2021-08-05 16:19                   ` Eli Zaretskii
2021-08-04 13:55   ` Font size (was: Merging the pgtk branch) Eli Zaretskii
2021-08-04 14:15     ` Font size Kévin Le Gouguec
2005-07-29  4:24 font size Baloff
2005-07-29  8:46 ` Peter Dyballa
2005-07-29 14:07 ` Eli Zaretskii
     [not found] ` <mailman.2046.1122646597.20277.help-gnu-emacs@gnu.org>
2005-07-30 10:15   ` Baloff
2005-07-30 10:50     ` Peter Dyballa
2005-07-30 11:02     ` Eli Zaretskii
2005-07-30 16:16     ` Tim X
2002-07-10 13:36 Massimo Alonzo
2002-04-23 16:24 Arash Bijanzadeh
2002-04-24  6:25 ` G Anna

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.