* Font size innacuracies (Windows)
@ 2022-03-01 10:24 Juan José García-Ripoll
2022-03-01 14:21 ` Phillip Susi
2022-03-01 17:02 ` Eli Zaretskii
0 siblings, 2 replies; 11+ messages in thread
From: Juan José García-Ripoll @ 2022-03-01 10:24 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]
Hi,
I am trying to reproduce a setup I am happy with in Visual Code to
Emacs. In particular, on VSCode I use Consolas at 14px, which is the
default setting and has the right density on my monitor. However, when I
try similar specifications on Emacs, it produces different results.
First of all, setting "Consolas:pixelsize=14" is wrong. It gives a much
larger font. The closest I have come to is using "pixelsize=12", but
even then the text does not have same size. Jumping to "pixelsize=11"
simply makes the text unreadable.
As example I attach a capture: on the left it is VSCode with Consolas at
14px, on the right Emacs. The horizontal width of the characters is
different, as it is the vertical spacing. This is default Emacs version
27.2 with no changes other than the Doom theme.
I know it is nitpicking, but it also affects the configuration of other
fonts I use for variable spacing. Somehow the jumps in Emacs are wildly
innacurate and more limited than on other Windows software.
Does anyone know how to fix this?
Best,
--
Juan José García Ripoll
http://juanjose.garciaripoll.com
http://quinfog.hbar.es
[-- Attachment #2: comparison.png --]
[-- Type: image/png, Size: 31360 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-01 10:24 Font size innacuracies (Windows) Juan José García-Ripoll
@ 2022-03-01 14:21 ` Phillip Susi
2022-03-01 15:16 ` Juan José García-Ripoll
2022-03-01 17:02 ` Eli Zaretskii
1 sibling, 1 reply; 11+ messages in thread
From: Phillip Susi @ 2022-03-01 14:21 UTC (permalink / raw)
To: Juan José García-Ripoll; +Cc: help-gnu-emacs
Juan José García-Ripoll <juanjose.garciaripoll@gmail.com> writes:
> Hi,
>
> I am trying to reproduce a setup I am happy with in Visual Code to
> Emacs. In particular, on VSCode I use Consolas at 14px, which is the
> default setting and has the right density on my monitor. However, when I
> try similar specifications on Emacs, it produces different results.
Eh? This appears to be a true type font, and those you spepcify the
desired size in points, not pixels, don't you? And windows has always
screwed up the conversion from points because they assume that all
monitors are 96 DPI.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-01 14:21 ` Phillip Susi
@ 2022-03-01 15:16 ` Juan José García-Ripoll
2022-03-01 15:26 ` Robert Pluim
2022-03-01 17:14 ` Eli Zaretskii
0 siblings, 2 replies; 11+ messages in thread
From: Juan José García-Ripoll @ 2022-03-01 15:16 UTC (permalink / raw)
To: help-gnu-emacs
I don't know. In principle the manual states that one can select pixels
in the name of the font, e.g. in set-frame-font. I tried it and changing
"Consolas:pixelsize=14" to "Consolas:pixelsize=12" does indeed change
the size.
In any case, what bothers me is that (i) even if Windows screws the
conversion, I do not find a suitable point or pixel size that matches
other applications (ii) the density of characters is different, both
vertically and horizontally, despite being monospaced fonts, (iii) the
difference in kerning and spacing is more remarked for variable-pitch
fonts.
Juanjo
Phillip Susi <phill@thesusis.net> writes:
> Juan José García-Ripoll <juanjose.garciaripoll@gmail.com> writes:
>
>> Hi,
>>
>> I am trying to reproduce a setup I am happy with in Visual Code to
>> Emacs. In particular, on VSCode I use Consolas at 14px, which is the
>> default setting and has the right density on my monitor. However, when I
>> try similar specifications on Emacs, it produces different results.
>
> Eh? This appears to be a true type font, and those you spepcify the
> desired size in points, not pixels, don't you? And windows has always
> screwed up the conversion from points because they assume that all
> monitors are 96 DPI.
>
>
>
--
Juan José García Ripoll
http://juanjose.garciaripoll.com
http://quinfog.hbar.es
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-01 15:16 ` Juan José García-Ripoll
@ 2022-03-01 15:26 ` Robert Pluim
2022-03-01 15:48 ` Juan José García-Ripoll
2022-03-01 17:14 ` Eli Zaretskii
1 sibling, 1 reply; 11+ messages in thread
From: Robert Pluim @ 2022-03-01 15:26 UTC (permalink / raw)
To: Juan José García-Ripoll; +Cc: help-gnu-emacs
>>>>> On Tue, 01 Mar 2022 16:16:12 +0100, Juan José García-Ripoll <juanjose.garciaripoll@gmail.com> said:
Juan> I don't know. In principle the manual states that one can select pixels
Juan> in the name of the font, e.g. in set-frame-font. I tried it and changing
Juan> "Consolas:pixelsize=14" to "Consolas:pixelsize=12" does indeed change
Juan> the size.
Juan> In any case, what bothers me is that (i) even if Windows screws the
Juan> conversion, I do not find a suitable point or pixel size that matches
Juan> other applications (ii) the density of characters is different, both
Juan> vertically and horizontally, despite being monospaced fonts, (iii) the
Juan> difference in kerning and spacing is more remarked for variable-pitch
Juan> fonts.
What happens if you use 'menu-set-font' instead?
Robert
--
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-01 15:26 ` Robert Pluim
@ 2022-03-01 15:48 ` Juan José García-Ripoll
0 siblings, 0 replies; 11+ messages in thread
From: Juan José García-Ripoll @ 2022-03-01 15:48 UTC (permalink / raw)
To: help-gnu-emacs
Same as if you put the pixel size in the name.
Robert Pluim <rpluim@gmail.com> writes:
>>>>>> On Tue, 01 Mar 2022 16:16:12 +0100, Juan José García-Ripoll
> <juanjose.garciaripoll@gmail.com> said:
>
> Juan> I don't know. In principle the manual states that one can select pixels
> Juan> in the name of the font, e.g. in set-frame-font. I tried it and changing
> Juan> "Consolas:pixelsize=14" to "Consolas:pixelsize=12" does indeed change
> Juan> the size.
>
> Juan> In any case, what bothers me is that (i) even if Windows screws the
> Juan> conversion, I do not find a suitable point or pixel size that matches
> Juan> other applications (ii) the density of characters is different, both
> Juan> vertically and horizontally, despite being monospaced fonts, (iii) the
> Juan> difference in kerning and spacing is more remarked for variable-pitch
> Juan> fonts.
>
> What happens if you use 'menu-set-font' instead?
>
> Robert
--
Juan José García Ripoll
http://juanjose.garciaripoll.com
http://quinfog.hbar.es
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-01 10:24 Font size innacuracies (Windows) Juan José García-Ripoll
2022-03-01 14:21 ` Phillip Susi
@ 2022-03-01 17:02 ` Eli Zaretskii
2022-03-02 7:19 ` Juan José García-Ripoll
1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-03-01 17:02 UTC (permalink / raw)
To: help-gnu-emacs
> From: Juan José García-Ripoll
> <juanjose.garciaripoll@gmail.com>
> Date: Tue, 01 Mar 2022 11:24:21 +0100
>
> First of all, setting "Consolas:pixelsize=14" is wrong. It gives a much
> larger font. The closest I have come to is using "pixelsize=12", but
> even then the text does not have same size. Jumping to "pixelsize=11"
> simply makes the text unreadable.
>
> As example I attach a capture: on the left it is VSCode with Consolas at
> 14px, on the right Emacs. The horizontal width of the characters is
> different, as it is the vertical spacing. This is default Emacs version
> 27.2 with no changes other than the Doom theme.
>
> I know it is nitpicking, but it also affects the configuration of other
> fonts I use for variable spacing. Somehow the jumps in Emacs are wildly
> innacurate and more limited than on other Windows software.
I don't really understand what problems you are trying to solve. I
see differences in font size and line spacing, but you seem to be
bothered by other issues as well, in particular, with variable-pitch
fonts, about which you didn't say anything specific and didn't show
any screenshots. So it's hard to say something intelligent about
this, especially since it sounds like what you actually show and
provide details for are not the problems that annoy you the most.
IOW, please be more specific and provide more details and perhaps
screenshots.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-01 15:16 ` Juan José García-Ripoll
2022-03-01 15:26 ` Robert Pluim
@ 2022-03-01 17:14 ` Eli Zaretskii
2022-03-02 7:43 ` Juan José García-Ripoll
1 sibling, 1 reply; 11+ messages in thread
From: Eli Zaretskii @ 2022-03-01 17:14 UTC (permalink / raw)
To: help-gnu-emacs
> From: Juan José García-Ripoll
> <juanjose.garciaripoll@gmail.com>
> Date: Tue, 01 Mar 2022 16:16:12 +0100
>
> I don't know. In principle the manual states that one can select pixels
> in the name of the font, e.g. in set-frame-font. I tried it and changing
> "Consolas:pixelsize=14" to "Consolas:pixelsize=12" does indeed change
> the size.
>
> In any case, what bothers me is that (i) even if Windows screws the
> conversion, I do not find a suitable point or pixel size that matches
> other applications (ii) the density of characters is different, both
> vertically and horizontally, despite being monospaced fonts, (iii) the
> difference in kerning and spacing is more remarked for variable-pitch
> fonts.
FWIW, I don't see such a big difference between sizes on my system, I
see a very slight difference that is barely noticeable. I compared
Emacs with MS Word using the same font, both for the default Courier
New and Consolas fonts.
Are you sure that "other application" doesn't have some settings that
enlarge the font and/or apply some non-default line spacing?
And again, if you say the problems are more severe with variable-pitch
fonts, please show those more severe problems, because otherwise it's
hard to understand what are the problems you are talking about. (I
don't have VSCode installed, and don't plan on installing it, sorry.)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-01 17:02 ` Eli Zaretskii
@ 2022-03-02 7:19 ` Juan José García-Ripoll
2022-03-02 20:13 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Juan José García-Ripoll @ 2022-03-02 7:19 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> I don't really understand what problems you are trying to solve. I
> see differences in font size and line spacing, but you seem to be
> bothered by other issues as well, in particular, with variable-pitch
> fonts, about which you didn't say anything specific
I have given up variable pitch fonts for the moment. I would like first
to fix the monospaced font issue. That would make me happy. I mentioned
the variable pitch font differences, and can provide further examples,
but I feel monospaced should be easier to debug or understand, and maybe
solving that also corrects other discrepancies. Don't you agree?
Best,
--
Juan José García Ripoll
http://juanjose.garciaripoll.com
http://quinfog.hbar.es
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-01 17:14 ` Eli Zaretskii
@ 2022-03-02 7:43 ` Juan José García-Ripoll
2022-03-02 20:06 ` Eli Zaretskii
0 siblings, 1 reply; 11+ messages in thread
From: Juan José García-Ripoll @ 2022-03-02 7:43 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
> FWIW, I don't see such a big difference between sizes on my system, I
> see a very slight difference that is barely noticeable. I compared
> Emacs with MS Word using the same font, both for the default Courier
> New and Consolas fonts.
I have problems comparing with MS Word, but it is true that Notepad and
Emacs render monospaced similarly when using the font dialogue.
I suspect that the variations are due to VSCode's display
engine. I just realized that the same discrepancies (more
pleasant rendering of Consolas) can be seen by embedding the *.cc files
in HTML (as <pre></pre>) and displaying them on Microsoft Edge, btw.
Best
--
Juan José García Ripoll
http://juanjose.garciaripoll.com
http://quinfog.hbar.es
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-02 7:43 ` Juan José García-Ripoll
@ 2022-03-02 20:06 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2022-03-02 20:06 UTC (permalink / raw)
To: help-gnu-emacs
> From: Juan José García-Ripoll
> <juanjose.garciaripoll@gmail.com>
> Date: Wed, 02 Mar 2022 08:43:22 +0100
>
> I suspect that the variations are due to VSCode's display
> engine. I just realized that the same discrepancies (more
> pleasant rendering of Consolas) can be seen by embedding the *.cc files
> in HTML (as <pre></pre>) and displaying them on Microsoft Edge, btw.
Maybe they use kerning, i.e. they run all the text they display
through a text-shaping engine (DirectWrite etc.). Emacs doesn't; we
only use a shaping engine for scripts that require complex text
shaping, and then only for some sequences of characters.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Font size innacuracies (Windows)
2022-03-02 7:19 ` Juan José García-Ripoll
@ 2022-03-02 20:13 ` Eli Zaretskii
0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2022-03-02 20:13 UTC (permalink / raw)
To: help-gnu-emacs
> From: Juan José García-Ripoll
> <juanjose.garciaripoll@gmail.com>
> Date: Wed, 02 Mar 2022 08:19:30 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
> > I don't really understand what problems you are trying to solve. I
> > see differences in font size and line spacing, but you seem to be
> > bothered by other issues as well, in particular, with variable-pitch
> > fonts, about which you didn't say anything specific
>
> I have given up variable pitch fonts for the moment. I would like first
> to fix the monospaced font issue. That would make me happy. I mentioned
> the variable pitch font differences, and can provide further examples,
> but I feel monospaced should be easier to debug or understand, and maybe
> solving that also corrects other discrepancies. Don't you agree?
As I don't yet understand well enough what are your problems with
variable-pitch fonts, I cannot say whether looking at fixed-pitch
fonts will identify the same problems or quite different ones. But
I'm okay talking about the latter if that's what you want.
So what are your problems with fixed-pitch fonts? The size problem
doesn't sound serious to me: why does it matter that you need to
select a slightly different size in Emacs?
Line spacing differences is probably due to spacing added by VSCode.
You can do that in Emacs as well: see the documentation of the
'line-spacing' variable. The default in Emacs is not to add any
spacing between lines.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2022-03-02 20:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-01 10:24 Font size innacuracies (Windows) Juan José García-Ripoll
2022-03-01 14:21 ` Phillip Susi
2022-03-01 15:16 ` Juan José García-Ripoll
2022-03-01 15:26 ` Robert Pluim
2022-03-01 15:48 ` Juan José García-Ripoll
2022-03-01 17:14 ` Eli Zaretskii
2022-03-02 7:43 ` Juan José García-Ripoll
2022-03-02 20:06 ` Eli Zaretskii
2022-03-01 17:02 ` Eli Zaretskii
2022-03-02 7:19 ` Juan José García-Ripoll
2022-03-02 20:13 ` Eli Zaretskii
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).