emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Building the igc branch on MS-Windows


From: Eli Zaretskii
Subject: Re: Building the igc branch on MS-Windows
Date: Sat, 27 Apr 2024 18:38:46 +0300

> From: Gerd Möllmann <gerd.moellmann@gmail.com>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> Date: Sat, 27 Apr 2024 17:29:44 +0200
> 
> Helmut Eller <eller.helmut@gmail.com> writes:
> 
> >> But its contents are weird
> >
> > In pdumper:
> >
> >       /* There are three kinds of font objects that all use PVEC_FONT,
> >          distinguished by their size.  Font specs and entities are
> >          harmless data carriers that we can dump like other Lisp
> >          objects.  Fonts themselves are window-system-specific and
> >          need to be recreated on each startup.  */
> >
> > could this be the reason?
> 
> I think I spider. Unbelievable. Whoever did that should be shot. No
> that's too mild. He shall use Visual C++ for one year :-).
> 
> Good catch! Thanks Helmut!

There's more, I think.  font.h says this near the end of 'struct font':

    /* Font-driver for the font.  */
    struct font_driver const *driver;

    /* There are more members in this structure, but they are private
       to the font-driver.  */
  };

And indeed, w32font.h does this:

  /* The actual structure for a w32 font, that can be cast to struct font.
     The Uniscribe backend extends this.  */
  struct w32font_info
  {
    struct font font;
    TEXTMETRICW metrics;
    unsigned int glyph_idx;
    struct w32_metric_cache **cached_metrics;
    int n_cache_blocks;
    HFONT hfont;
  };

And then w32uniscribe.c does

  /* Extension of w32font_info used by Uniscribe and HarfBuzz backends.  */
  struct uniscribe_font_info
  {
    struct w32font_info w32_font;
    /* This is used by the Uniscribe backend as a pointer to the script
       cache, and by the HarfBuzz backend as a pointer to a hb_font_t
       object.  */
    void *cache;
    /* This is used by the HarfBuzz backend to store the font scale.  */
    double scale;
  };



reply via email to

[Prev in Thread] Current Thread [Next in Thread]