[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Add installing optional URW++ fonts (issue 315850043 by address@hidd
From: |
trueroad |
Subject: |
Re: Add installing optional URW++ fonts (issue 315850043 by address@hidden) |
Date: |
Sat, 05 Nov 2016 04:50:51 -0700 |
Reviewers: lemzwerg, pkx166h,
Message:
On 2016/11/05 10:24:39, pkx166h wrote:
Hosoda-san (and perhaps others who know about font installation),
I cannot seem to be able to install 'just' a git commit (as is
described in the
warning message that is posted by the makefile when you run
'configure'), I can
git clone the repo of course and that works - as long as I know where
my fonts
are supposed to be installed to be correctly discovered - so my
questions are:
1. Should we really be telling people to install that entire repo (and
not just
the commit, if you see what I mean?) or is there a more elegant way to
just get
those few fonts without having to install the entire urw-core35-fonts
git repo
2. Longer term, will this repo end up being installable by a simpler
apt/dnf/yum
(or whatever your Linux Distro's Package Manager is) from their own
respective
repositories? As that would be much simpler (i.e. apt-get install
urw-core35-fonts) than documenting how to clone git repos. I tried it
literally
and got complaints because my .font dir was not empty, so you have to
clone into
a dir inside your currently installed font location.
I'd just like to get a better understanding so I can help document
this more
clearly in our Contributor Guide.
Thank you.
James
The necessary files are only following 12 files.
It is not all of the files in that repository.
C059-BdIta.otf
C059-Bold.otf
C059-Italic.otf
C059-Roman.otf
NimbusMonoPS-Bold.otf
NimbusMonoPS-BoldItalic.otf
NimbusMonoPS-Italic.otf
NimbusMonoPS-Regular.otf
NimbusSans-Bold.otf
NimbusSans-BoldOblique.otf
NimbusSans-Oblique.otf
NimbusSans-Regular.otf
If you put these files in the Fontconfig search path (e.g.
~/.local/share/fonts, ~/.fonts etc.),
configure script can find them.
Even if configure script cannot find them, compilation and installation
is possible since the files are optional.
Unfortunately, perhaps because those fonts are too new, not yet been
packaged.
I think that there are two ways to improve.
1. To suppress the display of warning.
If configure script finds those files, `make` uses them and `make
install` installs them.
Even if configure script does not find them, it does not display the
warning.
Even in this case, we will be able to contain those fonts in binary to
be distributed in lilypond.org.
2. To distribute the tarball of these 12 files from lilypond.org.
You can download and extract the tarball and put the files in
~/.local/share/fonts etc.
Description:
Issue 4991: Add installing optional URW++ fonts
LilyPond default fonts (TeX Gyre) do not have Greek and Cyrillic glyphs.
Newest URW 35 fonts (June 2016) have them.
http://git.ghostscript.com/?p=urw-core35-fonts.git;a=commit;h=79bcdfb34fbce12b592cce389fa7a19da6b5b018
This commit realizes the followings.
. configure script finds the following 12 OTF files.
. If they are found, `make install` installs them.
(Both TeX Gyre and URW fons are installed
under the lilypond fonts directory.)
. Even if they are not found, configure script does not raise error.
(Only TeX Gyre fonts are installed.)
C059-BdIta.otf
C059-Bold.otf
C059-Italic.otf
C059-Roman.otf
NimbusMonoPS-Bold.otf
NimbusMonoPS-BoldItalic.otf
NimbusMonoPS-Italic.otf
NimbusMonoPS-Regular.otf
NimbusSans-Bold.otf
NimbusSans-BoldOblique.otf
NimbusSans-Oblique.otf
NimbusSans-Regular.otf
Please review this at https://codereview.appspot.com/315850043/
Affected files (+55, -1 lines):
M GNUmakefile.in
M config.make.in
M configure.ac
M mf/GNUmakefile
Index: GNUmakefile.in
diff --git a/GNUmakefile.in b/GNUmakefile.in
index
abc7ecaf6aba1eea6416582c9a590ec2690296b1..76f4515be93f6034c4fd0966788a8ff512afb9b3
100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -260,6 +260,8 @@ $(tree-share-prefix)/mf-link-tree:
$(tree-share-prefix)/lilypond-force
cd $(tree-share-prefix)/fonts/otf && \
ln -s ../../../../../../mf/$(outconfbase)/*.otf . && \
$(foreach i,$(addprefix $(TEXGYRE_DIR)/,$(TEXGYRE_FILES)), \
+ ln -s $i . && ) true && \
+ $(foreach i,$(addprefix $(URWOTF_DIR)/,$(URWOTF_FILES)), \
ln -s $i . && ) true
-cd $(tree-share-prefix)/fonts && \
ln -s ../../../../../mf/$(outconfbase)/fonts.conf . && \
Index: config.make.in
diff --git a/config.make.in b/config.make.in
index
c681d761990ce0fe7cfa696a53c0ea1e1e12ed4f..d376a59f481c18a385d8b9703617d94ab8aa4662
100644
--- a/config.make.in
+++ b/config.make.in
@@ -92,6 +92,8 @@ vimdir = $(lilypond_datadir)/vim
TEXGYRE_DIR = @TEXGYRE_DIR@
TEXGYRE_FILES = @TEXGYRE_FILES@
+URWOTF_DIR = @URWOTF_DIR@
+URWOTF_FILES = @URWOTF_FILES@
################################################################
## PROGRAMS
Index: configure.ac
diff --git a/configure.ac b/configure.ac
index
0a753325d1eec6384b6c0972ae2d8330543bfdb6..1fa9d45b59497646232245deafc6bfb3a44ded81
100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,12 @@ AC_ARG_WITH(texgyre-dir,
[TEXGYRE_DIR=$withval],
[TEXGYRE_DIR=""])
+AC_ARG_WITH(urwotf-dir,
+ [AS_HELP_STRING([--with-urwotf-dir=DIR],
+ [location of URW++ OTF fonts.])],
+ [URWOTF_DIR=$withval],
+ [URWOTF_DIR=""])
+
reloc_b=no
AC_ARG_ENABLE(relocation,
[AS_HELP_STRING([--enable-relocation],
@@ -103,6 +109,48 @@ if test "$TEXGYRE_DIR" = ""
-o "$MISSING_TEXGYRE_FILES" != ""; then
else
AC_MSG_RESULT(yes)
fi
+AC_MSG_CHECKING([for URW++ OTF files])
+AC_SUBST(URWOTF_DIR)
+AC_SUBST(URWOTF_FILES)
+if test "$URWOTF_DIR" = ""; then
+ if test "$FCLIST" != ""; then
+ URWOTF_FILE=`$FCLIST "C059:fontformat=CFF" file | head -n 1`
+ if test "$URWOTF_FILE" != ""; then
+ URWOTF_FILE=`echo $URWOTF_FILE | sed 's/\(:.*\)$//g'`
+ URWOTF_FILE=`$PYTHON "$srcdir/scripts/auxiliar/readlink.py"
$URWOTF_FILE`
+ URWOTF_DIR=`AS_DIRNAME($URWOTF_FILE)`
+ fi
+ fi
+fi
+if test "$URWOTF_DIR" != "" ; then
+ for f in C059-BdIta.otf C059-Bold.otf \
+ C059-Italic.otf C059-Roman.otf \
+ NimbusMonoPS-Bold.otf NimbusMonoPS-BoldItalic.otf \
+ NimbusMonoPS-Italic.otf NimbusMonoPS-Regular.otf \
+ NimbusSans-Bold.otf NimbusSans-BoldOblique.otf \
+ NimbusSans-Oblique.otf NimbusSans-Regular.otf; do
+ if test ! -f "$URWOTF_DIR/$f"; then
+ MISSING_URWOTF_FILES="$MISSING_URWOTF_FILES $f"
+ else
+ URWOTF_FILES="$URWOTF_FILES $f"
+ fi
+ done
+fi
+if test "$URWOTF_DIR" = "" -o "$MISSING_URWOTF_FILES" != ""; then
+ AC_MSG_RESULT(no)
+ STEPMAKE_ADD_ENTRY(OPTIONAL,URW++ OTF fonts)
+ if test "$URWOTF_DIR" = ""; then
+ if test "$FCLIST" = ""; then
+ STEPMAKE_ADD_ENTRY(OPTIONAL,'(install the fc-list utility from
FontConfig, or use --with-urwotf-dir)')
+ else
+ STEPMAKE_ADD_ENTRY(OPTIONAL,"(download OTF files
from 'http://git.ghostscript.com/?p=urw-core35-fonts.git;a=commit;h=79bcdfb34fbce12b592cce389fa7a19da6b5b018'
and put them under '~/.local/share/fonts' etc., or use --with-urwotf-dir)")
+ fi
+ else
+ STEPMAKE_ADD_ENTRY(OPTIONAL,'(these files are missing:
$MISSING_URWOTF_FILES)')
+ fi
+else
+ AC_MSG_RESULT(yes)
+fi
AC_LANG([C++])
Index: mf/GNUmakefile
diff --git a/mf/GNUmakefile b/mf/GNUmakefile
index
4860f65f6e61a6203d4b21fa33773a11ce83117c..6a6475965e3e21f9d0be0502a02e19d738b67f41
100644
--- a/mf/GNUmakefile
+++ b/mf/GNUmakefile
@@ -36,6 +36,7 @@ SVG_FILES = $(OTF_FILES:%.otf=%.svg)
WOFF_FILES = $(OTF_FILES:%.otf=%.woff)
TEXGYRE_OTFS = $(addprefix $(TEXGYRE_DIR)/,$(TEXGYRE_FILES))
+URWOTF_OTFS = $(addprefix $(URWOTF_DIR)/,$(URWOTF_FILES))
LILYPOND_FONTS_CONF = $(outdir)/00-lilypond-fonts.conf \
$(outdir)/99-lilypond-fonts.conf
@@ -87,7 +88,8 @@ INSTALLATION_OUT_SUFFIXES = 1 2 3
INSTALLATION_OUT_DIR1 = $(local_lilypond_datadir)/fonts/otf
INSTALLATION_OUT_FILES1 = $(OTF_FILES) \
- $(TEXGYRE_OTFS)
+ $(TEXGYRE_OTFS) \
+ $(URWOTF_OTFS)
INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/fonts/svg
INSTALLATION_OUT_FILES2 = $(SVG_FILES) $(WOFF_FILES)
- Re: Add installing optional URW++ fonts (issue 315850043 by address@hidden), pkx166h, 2016/11/05
- Re: Add installing optional URW++ fonts (issue 315850043 by address@hidden),
trueroad <=
- Re: Add installing optional URW++ fonts (issue 315850043 by address@hidden), pkx166h, 2016/11/06
- Re: Add installing optional URW++ fonts (issue 315850043 by address@hidden), pkx166h, 2016/11/15
- Re: Add installing optional URW++ fonts (issue 315850043 by address@hidden), pkx166h, 2016/11/16
- Re: Add installing optional URW++ fonts (issue 315850043 by address@hidden), pkx166h, 2016/11/16
- Re: Add installing optional URW++ fonts (issue 315850043 by address@hidden), trueroad, 2016/11/17