all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* An issue with GDI? [Windows]
@ 2020-05-14 13:55 Angelo Graziosi
  2020-05-14 14:40 ` Eli Zaretskii
  2020-05-14 14:53 ` Juanma Barranquero
  0 siblings, 2 replies; 6+ messages in thread
From: Angelo Graziosi @ 2020-05-14 13:55 UTC (permalink / raw)
  To: emacs-devel

On Windows I use Cascadia Code font for Emacs. This font was introduced with the development of Windows Terminal.

Now I found that a good configuration was with this in the init.el file:

(setq default-frame-alist
      '(
        (width . 115) ; character
        (height . 49) ; lines
        (left . 840); pixel
        (top  .   0); pixel
        (font . "Cascadia Code-12") ; font
        ))

with it I had 46 line of text useful to write plus 3 were for tool bar etc.

Now a few day ago there was an update of the Cascadia Code font. With this new version I have only 37 useful line of text for writing because the gap between lines increased. 

I flagged the issue to Cascadia Code people:

  https://github.com/microsoft/cascadia-code/issues/266

they suggested to use  

  (setq-default line-spacing SOMETHING) 

but it didn't work because it seems that, by default, line-spacing is already at minimum (nil).

Someone there flagged that the issue could be related to the fact that Emacs and some other app (VIM) use the GDI which is too old. See the discussion following the above link.

Would it help to rebuild Emacs without GDI? The build I am using was done e few week ago with master 20200502_225014.

Ciao,
  Angelo.



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

* Re: An issue with GDI? [Windows]
  2020-05-14 13:55 An issue with GDI? [Windows] Angelo Graziosi
@ 2020-05-14 14:40 ` Eli Zaretskii
  2020-05-14 14:54   ` Angelo Graziosi
  2020-05-14 14:53 ` Juanma Barranquero
  1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-05-14 14:40 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: emacs-devel

> Date: Thu, 14 May 2020 15:55:33 +0200 (CEST)
> From: Angelo Graziosi <angelo.g0@libero.it>
> 
> Someone there flagged that the issue could be related to the fact that Emacs and some other app (VIM) use the GDI which is too old. See the discussion following the above link.
> 
> Would it help to rebuild Emacs without GDI?

You can't.  In order to be able to do that, someone will have to
implement the font-related APIs we use with others.

And I'm not yet sure the GDI APIs we use are relevant (but then I
didn't yet have time to read the discussion you point to, so maybe my
current opinion isn't worth much).  We had a similar issue with
another font (Noto Sans?), so it could be these fonts use some
features of the metrics that we disregard or something.

Unfortunately, we don't have font experts on board.



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

* Re: An issue with GDI? [Windows]
  2020-05-14 13:55 An issue with GDI? [Windows] Angelo Graziosi
  2020-05-14 14:40 ` Eli Zaretskii
@ 2020-05-14 14:53 ` Juanma Barranquero
  2020-05-14 17:38   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Juanma Barranquero @ 2020-05-14 14:53 UTC (permalink / raw)
  To: Angelo Graziosi; +Cc: Emacs developers

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

On Thu, May 14, 2020 at 3:58 PM Angelo Graziosi <angelo.g0@libero.it> wrote:

> Now a few day ago there was an update of the Cascadia Code font. With
this new version I have only 37 useful line of text for writing because the
gap between lines increased.

I had the very same issue.

> Someone there flagged that the issue could be related to the fact that
Emacs and some other app (VIM) use the GDI which is too old. See the
discussion following the above link.
>
> Would it help to rebuild Emacs without GDI? The build I am using was done
e few week ago with master 20200502_225014.

By default, master on Windows is using HarfBuzz to display characters, not
GDI. This is the first character of my .emacs (a semicolon):

             position: 1 of 42188 (0%), column: 0
            character: ; (displayed as ;) (codepoint 59, #o73, #x3b)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x3B
               script: latin
               syntax: < which means: comment
             category: .:Base, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 3b" or "C-x 8 RET SEMICOLON"
          buffer code: #x3B
            file code: #x3B (encoded by coding system utf-8-unix)
              display: by this font (glyph code)
    harfbuzz:-outline-Cascadia Code
PL-normal-normal-normal-mono-13-*-*-*-c-*-iso8859-1 (#x29B)

Anyway, Cascadia's changelog says:  " We've changed the typographic metrics
a bit to align with best practices and move away from using legacy Windows
GDI values."

And has a link to  https://github.com/microsoft/cascadia-code/pull/261
that says: "This change modifies the font vertical metrics for better
consistency cross-platform. Block drawing characters adjusted to account
for new metrics."

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

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

* Re: An issue with GDI? [Windows]
  2020-05-14 14:40 ` Eli Zaretskii
@ 2020-05-14 14:54   ` Angelo Graziosi
  0 siblings, 0 replies; 6+ messages in thread
From: Angelo Graziosi @ 2020-05-14 14:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


> Il 14 maggio 2020 alle 16.40 Eli Zaretskii <eliz@gnu.org> ha scritto:
> > 
> > Would it help to rebuild Emacs without GDI?
> 
> You can't.  In order to be able to do that, someone will have to
> implement the font-related APIs we use with others.

No, it does not help, indeed..
 
> And I'm not yet sure the GDI APIs we use are relevant (but then I
> didn't yet have time to read the discussion you point to, so maybe my
> current opinion isn't worth much).  We had a similar issue with
> another font (Noto Sans?), so it could be these fonts use some
> features of the metrics that we disregard or something.
> 
> Unfortunately, we don't have font experts on board.

Thanks in any case..



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

* Re: An issue with GDI? [Windows]
  2020-05-14 14:53 ` Juanma Barranquero
@ 2020-05-14 17:38   ` Eli Zaretskii
  2020-05-15 20:47     ` Juanma Barranquero
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2020-05-14 17:38 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: angelo.g0, emacs-devel

> From: Juanma Barranquero <lekktu@gmail.com>
> Date: Thu, 14 May 2020 16:53:58 +0200
> Cc: Emacs developers <emacs-devel@gnu.org>
> 
> By default, master on Windows is using HarfBuzz to display characters, not GDI.

That's unrelated.  HarfBuzz is used for shaping complex scripts, but
the basic low-level font APIs are still the same GDI APIs we used
before.  The Uniscribe backend also used/uses them.

> Anyway, Cascadia's changelog says:  " We've changed the typographic metrics a bit to align with best
> practices and move away from using legacy Windows GDI values."
> 
> And has a link to https://github.com/microsoft/cascadia-code/pull/261  that says: "This change modifies the
> font vertical metrics for better consistency cross-platform. Block drawing characters adjusted to account for
> new metrics."

And they are still discussing that, since other editors are affected.
I suggest to wait until they decide what to do with this.

In any case, as I said: we don't have any code that accesses font
metrics using APIs different from GDI.  To change that, someone who
knows this stuff will have to write the code, or at least tell us what
APIs to use instead.  Volunteers and suggestions are welcome.



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

* Re: An issue with GDI? [Windows]
  2020-05-14 17:38   ` Eli Zaretskii
@ 2020-05-15 20:47     ` Juanma Barranquero
  0 siblings, 0 replies; 6+ messages in thread
From: Juanma Barranquero @ 2020-05-15 20:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: angelo.g0, Emacs developers

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

Just announced:

Cascadia Code 2005.15

This release of Cascadia Code adjusts the Windows GDI metrics to reduce
line spacing and fix some vertical alignment issues in legacy applications.

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

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

end of thread, other threads:[~2020-05-15 20:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-14 13:55 An issue with GDI? [Windows] Angelo Graziosi
2020-05-14 14:40 ` Eli Zaretskii
2020-05-14 14:54   ` Angelo Graziosi
2020-05-14 14:53 ` Juanma Barranquero
2020-05-14 17:38   ` Eli Zaretskii
2020-05-15 20:47     ` Juanma Barranquero

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.