Bug 225744 - [PATCH] defaulting x11-fonts/fontconfig no-bitmap.conf
Summary: [PATCH] defaulting x11-fonts/fontconfig no-bitmap.conf
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-02-08 01:59 UTC by Yuichiro NAITO
Modified: 2019-06-15 04:08 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments
fontconfig-no-bitmaps.patch (909 bytes, patch)
2018-02-08 01:59 UTC, Yuichiro NAITO
no flags Details | Diff
Proposed patch (since 463966 revision) (2.06 KB, patch)
2018-03-09 19:13 UTC, lightside
lightside: maintainer-approval? (gnome)
Details | Diff
Proposed patch (since 464041 revision) (402 bytes, patch)
2018-03-10 03:35 UTC, lightside
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yuichiro NAITO 2018-02-08 01:59:02 UTC
Created attachment 190409 [details]
fontconfig-no-bitmaps.patch

Attached `fontconfig-no-bitmaps.patch` changes fontconfig no-bitmap.conf to default.
Please consider to apply this patch.

In my opinion,
new users to FreeBSD who setup desktop environment
often see bitmap fonts on their web browser.
For example,
Helvetica font is shown by bitmaps on github.com.

They may have negative impression to FreeBSD.
Compares to Ubuntu Linux (that focuses desktop environment),
Ubuntu fontconfig is set up with no-bitmap.conf.

For FreeBSD expert users,
they can customize their fontconfig easily.
Just remove symbolic link.

I hope new users love FreeBSD desktop.
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-03-09 08:14:51 UTC
A commit references this bug:

Author: ume
Date: Fri Mar  9 08:14:30 UTC 2018
New revision: 463941
URL: https://svnweb.freebsd.org/changeset/ports/463941

Log:
  defaulting x11-fonts/fontconfig no-bitmap.conf

  PR:		225744
  Submitted by:	Yuichiro NAITO

Changes:
  head/x11-fonts/fontconfig/Makefile
  head/x11-fonts/fontconfig/files/patch-conf.d_Makefile.in
Comment 2 Hajimu UMEMOTO freebsd_committer freebsd_triage 2018-03-09 08:15:51 UTC
Thanks, committed!
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-03-09 15:22:46 UTC
A commit references this bug:

Author: ume
Date: Fri Mar  9 15:22:06 UTC 2018
New revision: 463966
URL: https://svnweb.freebsd.org/changeset/ports/463966

Log:
  Fix plist after my previous commit.
  Make sure to install 70-no-bitmaps.conf.

  PR:		225744

Changes:
  head/x11-fonts/fontconfig/Makefile
  head/x11-fonts/fontconfig/pkg-plist
Comment 4 lightside 2018-03-09 19:13:47 UTC
Created attachment 191348 [details]
Proposed patch (since 463966 revision)

Hello.

I think, possible to create NO_BITMAPS (or with different name) port's option for proposed/committed changes in this PR.
Also possible to convert files/patch-conf.d_Makefile.in to sed patch, because of possible dynamic changes to conf.d/Makefile.in file after new version update(s), which may require to fix static patch otherwise.

Attched new patch after ports r463966 changes.
I added NO_BITMAPS to OPTIONS_DEFAULT as this PR proposed, but I don't know about whether this option should be enabled by default or not. Previously, it was as fontconfig's developers configured by default.

- Bump PORTREVISION
- Add NO_BITMAPS option
- Add OPTIONS_SUB=yes and adapt pkg-plist
- Convert files/patch-conf.d_Makefile.in to sed patch
Comment 5 lightside 2018-03-09 21:13:11 UTC
(In reply to comment #4)
Also added mentioned changes (in comment #4) for x11-fonts/fontconfig v2.12.6 update in bug 225164 comment #3. Just in case.
Comment 6 Yuichiro NAITO 2018-03-10 02:28:54 UTC
Your patch is definitely better than my patch.
HINTING option is not scope of this PR,
but I'm appreciate it.

It seems your patch deletes `files/patch-conf.d_Makefile.in`.
If it's intended,
please `svn rm files/patch-conf.d_Makefile.in` before making a patch.
It will help committer's work.
Comment 7 commit-hook freebsd_committer freebsd_triage 2018-03-10 02:38:52 UTC
A commit references this bug:

Author: ume
Date: Sat Mar 10 02:37:53 UTC 2018
New revision: 464041
URL: https://svnweb.freebsd.org/changeset/ports/464041

Log:
  - Add NO_BITMAPS option
  - Convert files/patch-conf.d_Makefile.in to sed patch

  PR:		225744
  Submitted by:	lightside

Changes:
  head/x11-fonts/fontconfig/Makefile
  head/x11-fonts/fontconfig/files/patch-conf.d_Makefile.in
  head/x11-fonts/fontconfig/pkg-plist
Comment 8 Hajimu UMEMOTO freebsd_committer freebsd_triage 2018-03-10 02:44:00 UTC
(In reply to lightside from comment #4)

It seems good to me.  So, I've committed it.
However, since it doesn't change the default of option, I didn't bump PORTREVISION.
Thank you for your contribution.
Comment 9 lightside 2018-03-10 03:35:31 UTC
Created attachment 191367 [details]
Proposed patch (since 464041 revision)

(In reply to Hajimu UMEMOTO from comment #8)
There are two OPTIONS_DEFINE values after ports r464041 changes.

- Remove first OPTIONS_DEFINE value
Comment 10 lightside 2018-03-10 03:46:37 UTC
Also take a note, that in case of NO_BITMAPS usage (which added to OPTIONS_DEFAULT as default option), the fc-list program (or with using fontconfig library) may not list *.pcf fonts in this case, e.g. installed by x11-fonts/xorg-fonts-100dpi (x11-fonts/font-adobe-100dpi, x11-fonts/font-bh-100dpi, x11-fonts/font-bitstream-100dpi, etc.), x11-fonts/xorg-fonts-75dpi (x11-fonts/font-adobe-75dpi, x11-fonts/font-bh-75dpi, x11-fonts/font-bitstream-75dpi, etc.), x11-fonts/terminus-font, etc.
Possible, that there are users of such ports, which may need to rebuild x11-fonts/fontconfing port with disabled NO_BITMAPS option or somehow override such new configuration.
Comment 11 commit-hook freebsd_committer freebsd_triage 2018-03-10 03:49:00 UTC
A commit references this bug:

Author: ume
Date: Sat Mar 10 03:47:57 UTC 2018
New revision: 464042
URL: https://svnweb.freebsd.org/changeset/ports/464042

Log:
  Remove wrongly introduced duplicate OPTIONS_DEFINE line.

  PR:		225744
  Reported by:	lightside <lightside__at__gmx.com>

Changes:
  head/x11-fonts/fontconfig/Makefile
Comment 12 lightside 2018-03-10 04:40:16 UTC
(In reply to comment #10)
How to check for x11-fonts/terminus-font port (if disabled NO_BITMAPS option for x11-fonts/fontconfig):
-8<--
% fc-list | sort | grep fonts/terminus-font | head -4
/usr/local/share/fonts/terminus-font/ter-112b.pcf.gz: xos4 Terminus:style=Bold
/usr/local/share/fonts/terminus-font/ter-112n.pcf.gz: xos4 Terminus:style=Regular
/usr/local/share/fonts/terminus-font/ter-114b.pcf.gz: xos4 Terminus:style=Bold
/usr/local/share/fonts/terminus-font/ter-114n.pcf.gz: xos4 Terminus:style=Regular
-->8-
Comment 13 lightside 2018-03-10 05:10:55 UTC
(In reply to comment #12)
> /usr/local/share/fonts/terminus-font/ter-112b.pcf.gz: xos4 Terminus:style=Bold
Someone may notice "xos4" in font's name. This is because of enabled LONG_PCF_NAMES option ("Enable long PCF family names") for print/freetype2 (reinstall of x11-fonts/fontconfig maybe required, because of fc-cache usage after installation).
There is following output with disabled LONG_PCF_NAMES option for print/freetype2:
-8<--
% fc-list | sort | grep fonts/terminus-font | head -4
/usr/local/share/fonts/terminus-font/ter-112b.pcf.gz: Terminus:style=Bold
/usr/local/share/fonts/terminus-font/ter-112n.pcf.gz: Terminus:style=Regular
/usr/local/share/fonts/terminus-font/ter-114b.pcf.gz: Terminus:style=Bold
/usr/local/share/fonts/terminus-font/ter-114n.pcf.gz: Terminus:style=Regular
-->8-

Probably, the mentioned issue in comment #0 may be solved with enabled LONG_PCF_NAMES option for print/freetype2, which may change "Helvetica" font's name to "Adobe Helvetica".
Comment 14 lightside 2018-03-10 05:19:30 UTC
(In reply to comment #13)
Some examples:
Disabled LONG_PCF_NAMES option for print/freetype2 and disabled NO_BITMAPS option for x11-fonts/fontconfig:
-8<--
% fc-list | sort | grep Helvetica | head -2
/usr/local/share/fonts/100dpi/helvB08-ISO8859-1.pcf.gz: Helvetica:style=Bold
/usr/local/share/fonts/100dpi/helvB08.pcf.gz: Helvetica:style=Bold
-->8--

Enabled LONG_PCF_NAMES option for print/freetype2 and disabled NO_BITMAPS option for x11-fonts/fontconfig:
-8<--
% fc-list | sort | grep Helvetica | head -2
/usr/local/share/fonts/100dpi/helvB08-ISO8859-1.pcf.gz: Adobe Helvetica:style=Bold
/usr/local/share/fonts/100dpi/helvB08.pcf.gz: Adobe Helvetica:style=Bold
-->8-
Comment 15 lightside 2018-03-10 05:28:54 UTC
(In reply to comment #13)
Also possible, that this issue was fixed after print/freetype2 (bug 225072) and x11-fonts/fontconfig (bug 225164) updates. So, I may suggest to check your testcase with Helvetica font for new versions with disabled NO_BITMAPS option.
Comment 16 commit-hook freebsd_committer freebsd_triage 2018-03-10 07:47:29 UTC
A commit references this bug:

Author: ume
Date: Sat Mar 10 07:47:23 UTC 2018
New revision: 464048
URL: https://svnweb.freebsd.org/changeset/ports/464048

Log:
  Disable NO_BITMAPS option by default for now.
  There are some people using the pcf fonts.

  PR:		225744

Changes:
  head/x11-fonts/fontconfig/Makefile
Comment 17 Yuichiro NAITO 2018-03-10 08:36:17 UTC
(In reply to lightside from comment #15)
Thanks for the suggestion.

(In comment #13)
>Probably, the mentioned issue in comment #0 may be solved with enabled LONG_PCF_NAMES option for print/freetype2, which may change "Helvetica" font's name to "Adobe Helvetica".

This is correct.
I checked Helvetica font on Github site is replaced to True Type Font.

(In comment #15)
>Also possible, that this issue was fixed after print/freetype2 (bug 225072) and x11-fonts/fontconfig (bug 225164) updates. So, I may suggest to check your testcase with Helvetica font for new versions with disabled NO_BITMAPS option.

After upgrading freetype2-2.6 (without LONG_PCF_NAMES) and fontconfig-2.12.6 (without NO_BITMAPS),
I don't see any changes about Helvetica font on Github site.

I see fontconfig affects xterm.
So committer changed the default option in comment #16, I think.
Comment 18 lightside 2018-03-10 17:54:56 UTC
(In reply to Yuichiro NAITO from comment #17)
> This is correct.
> I checked Helvetica font on Github site is replaced to True Type Font.
Good to know. For example, Arch Linux maintainer(s) of freetype2 also "#define PCF_CONFIG_OPTION_LONG_FAMILY_NAMES" for include/freetype/config/ftoption.h (which LONG_PCF_NAMES option does in print/freetype2 port), for some reason:
https://git.archlinux.org/svntogit/packages.git/tree/trunk/0003-Enable-long-PCF-family-names.patch?h=packages/freetype2&id=514f0d40b6602a391f285465c05115deb2420823
The same on Gentoo Linux (with comment about FREETYPE_PROPERTIES="pcf:no-long-family-names=1" to disable this, if needed):
https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/freetype/freetype-2.9.ebuild?id=57397114fdb0a8479877a9e9718d6d6de68a0bab#n78

On the other hand, freetype2's developers disabled PCF_CONFIG_OPTION_LONG_FAMILY_NAMES on v2.8: https://sourceforge.net/projects/freetype/files/freetype2/2.8/
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/CHANGES?h=VER-2-8#n15
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/include/freetype/config/ftoption.h?h=VER-2-8#n853

(In reply to Yuichiro NAITO from comment #17)
> After upgrading freetype2-2.6 (without LONG_PCF_NAMES) and fontconfig-2.12.6
> (without NO_BITMAPS), I don't see any changes about Helvetica font on
> Github site.
Ok, so updates with current default port's options doesn't affect issue with Helvetica font on GitHub site, if I understood correctly. Probably, this is about usage of correct port's options, e.g. either enabled NO_BITMAPS for x11-fonts/fontconfig or enabled LONG_PCF_NAMES for print/freetype2 port (and/or other manual settings, I guess).

If you want (almost) freetype2 v2.6 behavior on newer version(s), I may suggest to use following print/freetype2 options (including fix for this issue as enabled LONG_PCF_NAMES option):
LCD_FILTERING=on, LONG_PCF_NAMES=on, V38=off, V40=off, FIX_SIZE_METRICS=on, TT_SIZE_METRICS=off.
Other options, if desired. For example, DEBUG=off, DOCS=on, PNG=on, TABLE_VALIDATION=off.
Comment 19 lightside 2018-03-11 05:50:52 UTC
(In reply to Yuichiro NAITO from comment #17)
> After upgrading freetype2-2.6 (without LONG_PCF_NAMES)
Probably, you meant about freetype2 v2.9. So, some options in comment #18 was not very related (v2.6). Sorry about off-topic.

Thanks reporter and committer for attention.
Comment 20 Yuichiro NAITO 2018-03-11 06:43:13 UTC
Thanks for a lot of advises.
I took a time to check them.

Freetype2 with LONG_PCF_NAMES just is my solution of this PR, I think.
But it could be a big impact to many applications.
Applications need to change font names that want to use.

So I think I should take a different approach for good font environment.
The focus of this PR is not satisfied, but I had lots of nice experience.

Now we have make options for fontconfig port.
I will close this PR.
Thank you very much for many advises!