GNU bug report logs - #10399
[PATCH] Document win32 font backends

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Thu, 29 Dec 2011 14:10:03 UTC

Severity: normal

Tags: patch

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10399 in the body.
You can then email your comments to 10399 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Thu, 29 Dec 2011 14:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Daniel Colascione <dancol <at> dancol.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 29 Dec 2011 14:10:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Document win32 font backends
Date: Thu, 29 Dec 2011 06:06:16 -0800
---
 doc/lispref/frames.texi |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index dad1f28..e4338c8 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -888,7 +888,10 @@ and bar becomes a narrower bar).
 A list of symbols, specifying the @dfn{font backends} to use for
 drawing fonts in the frame, in order of priority.  On X, there are
 currently two available font backends: @code{x} (the X core font
-driver) and @code{xft} (the Xft font driver).  On other systems, there
+driver) and @code{xft} (the Xft font driver).  On Windows, there
+are currently two available font backends: @code{gdi} and
+@code{uniscribe}.
+On other systems, there
 is only one available font backend, so it does not make sense to
 modify this frame parameter.
 
-- 
1.7.5.1





Reply sent to Juanma Barranquero <lekktu <at> gmail.com>:
You have taken responsibility. (Thu, 29 Dec 2011 16:25:02 GMT) Full text and rfc822 format available.

Notification sent to Daniel Colascione <dancol <at> dancol.org>:
bug acknowledged by developer. (Thu, 29 Dec 2011 16:25:02 GMT) Full text and rfc822 format available.

Message #10 received at 10399-done <at> debbugs.gnu.org (full text, mbox):

From: Juanma Barranquero <lekktu <at> gmail.com>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: 10399-done <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Thu, 29 Dec 2011 17:21:08 +0100
On Thu, Dec 29, 2011 at 15:06, Daniel Colascione <dancol <at> dancol.org> wrote:

> -driver) and @code{xft} (the Xft font driver).  On other systems, there
> +driver) and @code{xft} (the Xft font driver).  On Windows, there
> +are currently two available font backends: @code{gdi} and
> +@code{uniscribe}.
> +On other systems, there

Committed, thanks.

    Juanma




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Thu, 29 Dec 2011 17:01:01 GMT) Full text and rfc822 format available.

Message #13 received at 10399 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: lekktu <at> gmail.com, 10399 <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Thu, 29 Dec 2011 18:57:22 +0200
> From: Juanma Barranquero <lekktu <at> gmail.com>
> Date: Thu, 29 Dec 2011 17:21:08 +0100
> Cc: 10399-done <at> debbugs.gnu.org
> 
> On Thu, Dec 29, 2011 at 15:06, Daniel Colascione <dancol <at> dancol.org> wrote:
> 
> > -driver) and @code{xft} (the Xft font driver).  On other systems, there
> > +driver) and @code{xft} (the Xft font driver).  On Windows, there
> > +are currently two available font backends: @code{gdi} and
> > +@code{uniscribe}.
> > +On other systems, there
> 
> Committed, thanks.

Please add there an @xref to "(emacs)Windows Fonts", where there are
more details about that.

Thanks.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Thu, 29 Dec 2011 17:20:02 GMT) Full text and rfc822 format available.

Message #16 received at 10399 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Juanma Barranquero <lekktu <at> gmail.com>, 10399 <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Thu, 29 Dec 2011 09:16:16 -0800
[Message part 1 (text/plain, inline)]
On 12/29/11 8:57 AM, Eli Zaretskii wrote:
>> From: Juanma Barranquero <lekktu <at> gmail.com>
>> Date: Thu, 29 Dec 2011 17:21:08 +0100
>> Cc: 10399-done <at> debbugs.gnu.org
>>
>> On Thu, Dec 29, 2011 at 15:06, Daniel Colascione <dancol <at> dancol.org> wrote:
>>
>>> -driver) and @code{xft} (the Xft font driver).  On other systems, there
>>> +driver) and @code{xft} (the Xft font driver).  On Windows, there
>>> +are currently two available font backends: @code{gdi} and
>>> +@code{uniscribe}.
>>> +On other systems, there
>>
>> Committed, thanks.
> 
> Please add there an @xref to "(emacs)Windows Fonts", where there are
> more details about that.

Doing that makes sense.

Since we're on the subject of Windows font backends: is it worth
creating a DirectWrite backend? It does a better job of inter-character
spacing and rendering at small sizes than Uniscribe does.

https://bugzilla.mozilla.org/show_bug.cgi?id=517642

https://blog.mozilla.com/nattokirai/2009/10/22/better-postscript-cff-font-rendering-with-directwrite/

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Sat, 31 Dec 2011 11:00:01 GMT) Full text and rfc822 format available.

Message #19 received at 10399 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: lekktu <at> gmail.com, 10399 <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Sat, 31 Dec 2011 12:56:54 +0200
> Date: Thu, 29 Dec 2011 09:16:16 -0800
> From: Daniel Colascione <dancol <at> dancol.org>
> CC: Juanma Barranquero <lekktu <at> gmail.com>, 10399 <at> debbugs.gnu.org
> 
> Since we're on the subject of Windows font backends: is it worth
> creating a DirectWrite backend? It does a better job of inter-character
> spacing and rendering at small sizes than Uniscribe does.
> 
> https://bugzilla.mozilla.org/show_bug.cgi?id=517642
> 
> https://blog.mozilla.com/nattokirai/2009/10/22/better-postscript-cff-font-rendering-with-directwrite/

Looks like it has only C++ bindings?  One of the comments on MSDN
says:

  DirectDraw header file is not compatible with C programming language
  and can only be included in C++ code. However, C-style redeclaration
  of contents in this header file alone (excluding other header files it
  includes), will succeed in resolving the issue.

Also, I see no dwrite.h header in the MinGW runtime and w32api
distributions, and no lib*.a import libraries for dwrite.dll.  Am I
missing something?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Sat, 31 Dec 2011 11:08:01 GMT) Full text and rfc822 format available.

Message #22 received at 10399 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: lekktu <at> gmail.com, 10399 <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Sat, 31 Dec 2011 03:04:42 -0800
[Message part 1 (text/plain, inline)]
On 12/31/11 2:56 AM, Eli Zaretskii wrote:
>> Date: Thu, 29 Dec 2011 09:16:16 -0800
>> From: Daniel Colascione <dancol <at> dancol.org>
>> CC: Juanma Barranquero <lekktu <at> gmail.com>, 10399 <at> debbugs.gnu.org
>>
>> Since we're on the subject of Windows font backends: is it worth
>> creating a DirectWrite backend? It does a better job of inter-character
>> spacing and rendering at small sizes than Uniscribe does.
>>
>> https://bugzilla.mozilla.org/show_bug.cgi?id=517642
>>
>> https://blog.mozilla.com/nattokirai/2009/10/22/better-postscript-cff-font-rendering-with-directwrite/
> 
> Looks like it has only C++ bindings?  One of the comments on MSDN
> says:
> 
>   DirectDraw header file is not compatible with C programming language
>   and can only be included in C++ code. However, C-style redeclaration
>   of contents in this header file alone (excluding other header files it
>   includes), will succeed in resolving the issue.

DirectWrite is COM, and all COM facilities can be used by plain C.

The C compatibility issue arises from a problem with the header for
the COM interface produced by the IDL compiler (probably, nobody tried
to actually use DirectWrite from C before shipping.)  This problem
doesn't prevent our using DirectWrite from C: as the MSDN comment
indicates, the declarations just need to be extracted and rephrased as
standard C.

> Also, I see no dwrite.h header in the MinGW runtime and w32api
> distributions, and no lib*.a import libraries for dwrite.dll.  Am I
> missing something?

No. Either these packages would need to be updated to include
DirectWrite or we'd need to just include declarations for the
appropriate functions and interfaces ourselves.

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Sat, 31 Dec 2011 11:27:01 GMT) Full text and rfc822 format available.

Message #25 received at 10399 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: lekktu <at> gmail.com, 10399 <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Sat, 31 Dec 2011 13:22:51 +0200
> Date: Sat, 31 Dec 2011 03:04:42 -0800
> From: Daniel Colascione <dancol <at> dancol.org>
> CC: lekktu <at> gmail.com, 10399 <at> debbugs.gnu.org
> 
> The C compatibility issue arises from a problem with the header for
> the COM interface produced by the IDL compiler (probably, nobody tried
> to actually use DirectWrite from C before shipping.)  This problem
> doesn't prevent our using DirectWrite from C: as the MSDN comment
> indicates, the declarations just need to be extracted and rephrased as
> standard C.
> 
> > Also, I see no dwrite.h header in the MinGW runtime and w32api
> > distributions, and no lib*.a import libraries for dwrite.dll.  Am I
> > missing something?
> 
> No. Either these packages would need to be updated to include
> DirectWrite or we'd need to just include declarations for the
> appropriate functions and interfaces ourselves.

If a MinGW build of Emacs can use DirectWrite, and if there will be no
copyright issues with providing the missing headers and interface
libraries, then feel free to work on adding DirectWrite support to
Emacs.  Thanks in advance.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Sat, 31 Dec 2011 11:45:02 GMT) Full text and rfc822 format available.

Message #28 received at 10399 <at> debbugs.gnu.org (full text, mbox):

From: Daniel Colascione <dancol <at> dancol.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: lekktu <at> gmail.com, 10399 <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Sat, 31 Dec 2011 03:41:46 -0800
[Message part 1 (text/plain, inline)]
On 12/31/11 3:22 AM, Eli Zaretskii wrote:
> If a MinGW build of Emacs can use DirectWrite, and if there will be no
> copyright issues with providing the missing headers and interface
> libraries, then feel free to work on adding DirectWrite support to
> Emacs.  Thanks in advance.

What exactly is the legal situation surrounding headers? Would copying
and modifying declarations from the Microsoft headers or MSDN be
acceptable, considering that there is really only one way to describe
what a function is called and what parameters it takes? If not, how
exactly would one create untainted declarations?

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Sat, 31 Dec 2011 11:53:02 GMT) Full text and rfc822 format available.

Message #31 received at 10399 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: lekktu <at> gmail.com, 10399 <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Sat, 31 Dec 2011 13:48:35 +0200
> Date: Sat, 31 Dec 2011 03:41:46 -0800
> From: Daniel Colascione <dancol <at> dancol.org>
> CC: lekktu <at> gmail.com, 10399 <at> debbugs.gnu.org
> 
> What exactly is the legal situation surrounding headers?

Sorry, I have no idea.  I was wondering about that myself.

> Would copying and modifying declarations from the Microsoft headers
> or MSDN be acceptable, considering that there is really only one way
> to describe what a function is called and what parameters it takes?
> If not, how exactly would one create untainted declarations?

One way of finding out the answers would be to ask how MinGW (or is it
Cygwin?) produces the headers in the w32api distribution, and how they
avoid the copyright issues when they do.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10399; Package emacs. (Sat, 31 Dec 2011 15:27:01 GMT) Full text and rfc822 format available.

Message #34 received at 10399 <at> debbugs.gnu.org (full text, mbox):

From: Óscar Fuentes <ofv <at> wanadoo.es>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: lekktu <at> gmail.com, Eli Zaretskii <eliz <at> gnu.org>, 10399 <at> debbugs.gnu.org
Subject: Re: bug#10399: [PATCH] Document win32 font backends
Date: Sat, 31 Dec 2011 16:23:15 +0100
Daniel Colascione <dancol <at> dancol.org> writes:

> On 12/31/11 3:22 AM, Eli Zaretskii wrote:
>> If a MinGW build of Emacs can use DirectWrite, and if there will be no
>> copyright issues with providing the missing headers and interface
>> libraries, then feel free to work on adding DirectWrite support to
>> Emacs.  Thanks in advance.
>
> What exactly is the legal situation surrounding headers? Would copying
> and modifying declarations from the Microsoft headers or MSDN be
> acceptable, considering that there is really only one way to describe
> what a function is called and what parameters it takes? If not, how
> exactly would one create untainted declarations?

IIRC, copying from the headers is not acceptable, as Microsoft's SDK
license bans that. Copying from MSDN is correct, because it is publicly
available documentation.

As Eli suggests, asking on the MinGW ml would provide definite answers,
as creating headers for the SDK/CRT/etc is what MinGW does all the time.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 29 Jan 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 80 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.