Wine's forked version of fontforge

Jens Reyer jre.winesim at
Fri Apr 29 21:13:24 CDT 2016

[CC to Huw Davies because I have a question about one of his changes]

On 04/22/2016 12:54 PM, Alexandre Julliard wrote:
> Jens Reyer <jre.winesim at> writes:
>> Wine and Debian are both using the quite old fontforge version
>> 20120731-b, the patches apply cleanly in Debian.
>> But upstream is actively developing and in Debian someone is working on
>> packaging a recent version (not sure with what outcome, e.g. afaik there
>> is at least one upstream regression blocking an update).
>> Are there any plans in Wine to update to a newer version?
> No plans currently, but I can certainly look into it if it helps.

Thanks. First off, I successfully tested the current fontforge 
20160404. I built Wine and the .ttf files with it, and verified in one 
app that relies on them that they are working. So no immediate need to
update, but it might be a good idea generally.

After looking into your patches and explanation my understanding is
that we may regenerate the .ttf files in Debian without having to 
worry about the results. However for contributing to Wine the current 
Debian fontforge is not suitable. So I started trying to get your 
changes applied upstream:

>> 1. Various hacks to avoid putting timestamps in generated files (AJ).

Created issue
The timestamps are also a hindrance for reproducible builds, and need 
to be tackled somehow in fontforge anyway.

>> 2. - Avoid outputting trailing spaces in sfd files (AJ).

Created pull request
for hopefully all remaining changes.

>> 3. Enable the width of individual bitmap strikes to be altered (Huw Davies).
>> Since the import of upstream version 20120731-b this patch only has a
>> third of its original size. Are the remaining Wine changes still
>> necessary, or are they cruft? If still needed, I guess they should be
>> pushed upstream.
>> In 20160404 not much seems to have changed, but the containing file
>> bitmapview.c was moved ("splitting ui code from fontforge/ to
>> fontforgeexe/").
>> Same as above: is this only needed when creating fonts? Looks like a
>> candidate for upstream.
> I believe it's still needed, I'm not sure why that part didn't get
> upstream.

See below for the remaining changes. I didn't bring that to upstream, 
because I don't know how to test this. Instructions, or a review of 
the patch and whether its still needed in 20160404, would be welcome.
Alternatively, if you update to a newer fontforge I'd filter out the
remaining diff and just go with that.

>> 4. Don't save the selected state. (Huw Davies)

Created issue for
this and other local information saved in sfds.


 fontforgeexe/bitmapview.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/fontforgeexe/bitmapview.c b/fontforgeexe/bitmapview.c
index 7cee735..749123d 100644
--- a/fontforgeexe/bitmapview.c
+++ b/fontforgeexe/bitmapview.c
@@ -1758,8 +1758,6 @@ static void BVMenuSetWidth(GWindow gw,struct gmenuitem *mi,GEvent *g) {
     SplineChar *sc;
     int val;
-    if ( !bv->bdf->sf->onlybitmaps )
     if ( mi->mid==MID_SetWidth ) {
 	sprintf( buffer,"%d",bv->bc->width);
 	ret = gwwv_ask_string(_("Set Width..."),buffer,_("Set Width..."));
@@ -1778,6 +1776,10 @@ return;
 	bv->bc->vwidth = val;
+    if ( !bv->bdf->sf->onlybitmaps )
     for ( bdf=bv->bdf->sf->bitmaps; bdf!=NULL; bdf=bdf->next )
 	if ( bdf->pixelsize > mysize )
@@ -2065,10 +2067,10 @@ static void mtlistcheck(GWindow gw,struct gmenuitem *mi,GEvent *e) {
     for ( mi = mi->sub; mi->ti.text!=NULL || mi->ti.line ; ++mi ) {
 	switch ( mi->mid ) {
 	  case MID_SetWidth:
-	    mi->ti.disabled = !bv->bdf->sf->onlybitmaps;
+	    mi->ti.disabled = 0;
 	  case MID_SetVWidth:
-	    mi->ti.disabled = !bv->bdf->sf->onlybitmaps || !bv->bdf->sf->hasvmetrics;
+	    mi->ti.disabled = !bv->bdf->sf->hasvmetrics;

More information about the wine-devel mailing list