On Fri, 10 Jan 2025 13:21:01 +0100, Stuart Henderson <s...@spacehopper.org> wrote: > > A few tweaks: > > - use font MODULES > - include OpenMoji-black-glyf.ttf > - tweak comment in files/90-openmoji-aliases.conf (it's freetype > not fontconfig that is built without PNG support) > - SYSCONFDIR refers to the directory from ports, when referring to > a directory from base it should just use /etc. however, I don't really > like font config being changed just from pkg_add'ing something, how > about just showing the user how to link it themselves instead? >
Thanks for tweaks. The only reason I wanted to add this font at all is simple: there's no way to use emoji in Gtk applications. Nerd and other fonts are PNG based and need PNG support in freetype. I doubt that libpng in the base can be sold for a reason "add emoji", am I wrong? With that assumption, the idea of simplifying end-user life by just pkg_add openmoji, which can be done as a RDEP for something like pango. Note that this new setting doesn't affect emoji in Wiresshark and Telegram (which are both Qt based), Chrome and Firefox. Do you still think we should ask users to run a command to fix their fonts? > diff --git a/fonts/openmoji/Makefile b/fonts/openmoji/Makefile > index 4b1e359..71b0108 100644 > --- a/fonts/openmoji/Makefile > +++ b/fonts/openmoji/Makefile > @@ -1,6 +1,9 @@ > -COMMENT = SVG based open source emojis > +COMMENT = SVG/COLR-based open source emoji fonts > > -DIST_TUPLE = github hfg-gmuend openmoji 15.1.0 . > +MODFONT_FAMILY = openmoji > +MODFONT_VERSION = 15.1.0 > + > +DIST_TUPLE = github hfg-gmuend openmoji ${MODFONT_VERSION} . > > CATEGORIES = fonts > > @@ -9,17 +12,17 @@ HOMEPAGE = https://openmoji.org/ > # CC-BY-SA > PERMIT_PACKAGE = Yes > > +MODULES = font > + > NO_BUILD = Yes > NO_TEST = Yes > > -PKG_ARCH = * > +MODFONT_FONTFILES = font/OpenMoji-color-colr1_svg/*.ttf \ > + font/OpenMoji-black-glyf/*.ttf > > -do-install: > +post-install: > ${INSTALL_DATA_DIR} ${PREFIX}/share/openmoji > ${INSTALL_DATA} ${FILESDIR}/90-openmoji-aliases.conf \ > ${PREFIX}/share/openmoji > - ${INSTALL_DATA_DIR} ${PREFIX}/share/fonts/openmoji > - ${INSTALL_DATA} ${WRKSRC}/font/OpenMoji-color-colr1_svg/*.ttf \ > - ${PREFIX}/share/fonts/openmoji > > .include <bsd.port.mk> > diff --git a/fonts/openmoji/files/90-openmoji-aliases.conf > b/fonts/openmoji/files/90-openmoji-aliases.conf > index 8ba6215..5a4bc33 100644 > --- a/fonts/openmoji/files/90-openmoji-aliases.conf > +++ b/fonts/openmoji/files/90-openmoji-aliases.conf > @@ -2,8 +2,10 @@ > <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> > <fontconfig> > <!-- > - OpenBSD's fontconfig does not support PNG fonts. > Set OpenMoji Color as the default emoji font. > + This includes SVG and COLR and is supported by OpenBSD's > + build of freetype which does not support embedded PNG > + bitmaps as used in most other emoji fonts. > --> > <match> > <test name="family"> > diff --git a/fonts/openmoji/pkg/MESSAGE b/fonts/openmoji/pkg/MESSAGE > new file mode 100644 > index 0000000..2a5eb2a > --- /dev/null > +++ b/fonts/openmoji/pkg/MESSAGE > @@ -0,0 +1,2 @@ > +To use OpenMoji as your default system emoji font, > + # ln -s ${PREFIX}/share/openmoji/90-openmoji-aliases.conf > /etc/fonts/conf.d/ > diff --git a/fonts/openmoji/pkg/PLIST b/fonts/openmoji/pkg/PLIST > index b98f557..674daf6 100644 > --- a/fonts/openmoji/pkg/PLIST > +++ b/fonts/openmoji/pkg/PLIST > @@ -1,6 +1,6 @@ > share/fonts/ > @fontdir share/fonts/openmoji/ > +share/fonts/openmoji/OpenMoji-black-glyf.ttf > share/fonts/openmoji/OpenMoji-color-colr1_svg.ttf > share/openmoji/ > share/openmoji/90-openmoji-aliases.conf > -@sample ${SYSCONFDIR}/fonts/conf.d/90-openmoji-aliases.conf > -- wbr, Kirill