emacs-devel
[Top][All Lists]
Advanced

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

Re: How to link new libraries when building emacs


From: Eli Zaretskii
Subject: Re: How to link new libraries when building emacs
Date: Thu, 04 Apr 2024 09:47:36 +0300

> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Thu, 04 Apr 2024 11:15:43 +0800
> 
> Elijah G <eg642616@gmail.com> writes:
> 
> > Yes you are right, but since d1d2.h is also made in C i think it
> > may be possible to import it into emacs, (except d2d1_helper headers
> > since they are made in pure C++ (also i'm thinking of adding another
> > header into emacs to add similar helper functions)),
> 
> If this header requires a C++ compiler, I can't promise the additional
> build-time requirement will be acceptable.

AFAICT, that header can be used both with a C++ compiler and a C
compiler.  See the D2D_USE_C_DEFINITIONS macro in the header and how
it is set and used.

> > It's only a test that I made to check if it's possible to import it
> > Without dueling with C++ and using their functions and/or variables
> > in C (I'm not sure where I should move this code snippet).
> 
> syms_of_w32font, perhaps?

No, syms_of_w32font is run during dumping.  The right place is in
syms_of_w32uniscribe_for_pdumper, when 'initialized' is non-zero
(i.e. not during dumping).  This assumes that using Direct2D with the
'gdi' font back-end is either impossible or doesn't make a lot of
sense anyway.

I'm guessing that using Direct2D will need a whole new font back-end,
since we'd need a different implementation of the main drawing methods
exported by the font driver.



reply via email to

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