lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix Issue 2146 "Illegal entry in bfrange block in ToUnicode CMap" (i


From: john . mandereau
Subject: Re: Fix Issue 2146 "Illegal entry in bfrange block in ToUnicode CMap" (issue 6399046)
Date: Sun, 15 Jul 2012 00:37:15 +0000

Reviewers: Graham Percival,

Message:
Hi Graham,

Thanks for the quick review, I'll upload another patch when I get
another review or at the earliest this week-end.

Please also note my comments on the bug tracker w.r.t. distribution of
lilypond.map and documentation.


http://codereview.appspot.com/6399046/diff/1/Documentation/common-macros.itexi
File Documentation/common-macros.itexi (right):

http://codereview.appspot.com/6399046/diff/1/Documentation/common-macros.itexi#newcode16
Documentation/common-macros.itexi:16: % code stolen from Heiko
Oberdiek's `ifpdf' package
On 2012/07/15 00:21:16, Graham Percival wrote:
sorry to nitpick, but could you use the word "copied" instead?
there's no
benefit to waving a red flag to anybody doing casual greps and looking
for
trouble.

OK, I had not thought of that.

http://codereview.appspot.com/6399046/diff/1/configure.in
File configure.in (right):

http://codereview.appspot.com/6399046/diff/1/configure.in#newcode66
configure.in:66: _NCSB_SOURCE_FILES_=""
On 2012/07/15 00:21:16, Graham Percival wrote:
what's the convention for leading _ in names?  I havent' encountered
this
before.

It was just my lack of imagination for a variable that should go through
filtering (namely checking for "Cyrillic") before being AC_SUBSTed. If
using an underscore is really not appropriate, then I'll invent some
variable name.

Description:
Fix Issue 2146 "Illegal entry in bfrange block in ToUnicode CMap"

Please review this at http://codereview.appspot.com/6399046/

Affected files:
  M Documentation/common-macros.itexi
  M config.make.in
  M configure.in
  M make/lilypond-vars.make
  M make/substitute.make
  M scripts/build/lys-to-tely.py
  M tex/GNUmakefile
  A tex/lilypond.map.in


Index: Documentation/common-macros.itexi
diff --git a/Documentation/common-macros.itexi b/Documentation/common-macros.itexi index baff739e3cfce1bde7ccf04a13d4708ae16d9ce8..b5577b1459bd923e74a4c4ce2a1147f5ef084919 100644
--- a/Documentation/common-macros.itexi
+++ b/Documentation/common-macros.itexi
@@ -10,6 +10,21 @@
 @set txicodequoteundirected
 @set txicodequotebacktick

address@hidden Trick to use with proper font mappings the same NCSB fonts as
address@hidden LilyPond instead of those provided by TeX distribution
address@hidden
+% code stolen from Heiko Oberdiek's `ifpdf' package
+% to call \pdfmapfile only in PDF mode
+\begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname pdfoutput\endcsname\relax
+\else
+  \ifnum\pdfoutput<1 %
+  \else
+    \pdfmapfile{=lilypond.map}
+  \fi
+\fi
address@hidden tex
+

 @c   ***** Displaying text *****

Index: config.make.in
diff --git a/config.make.in b/config.make.in
index 3ed8e53b05b5dde9123bec6be15e7debf7ed5511..aa674379e3dcaa8679195c722f377c6b3ce84922 100644
--- a/config.make.in
+++ b/config.make.in
@@ -90,6 +90,7 @@ vimdir = $(lilypond_datadir)/vim


 NCSB_SOURCE_FILES = @NCSB_SOURCE_FILES@
+NCSB_DIR = @NCSB_DIR@

 ################################################################
 ## PROGRAMS
Index: configure.in
diff --git a/configure.in b/configure.in
index 0189be15b2aedb767832d777eccd8c6955dde845..972cc25d40d4a644f6b11814da54a702bd9d2d47 100644
--- a/configure.in
+++ b/configure.in
@@ -62,13 +62,14 @@ STEPMAKE_COMPILE
 AC_CHECK_PROG(FCLIST, fc-list, fc-list)
 AC_MSG_CHECKING([New Century Schoolbook PFB files])
 AC_SUBST(NCSB_SOURCE_FILES)
+AC_SUBST(NCSB_DIR)
+_NCSB_SOURCE_FILES_=""
 if test "$NCSB_DIR" != "" ;  then
-  NCSB_SOURCE_FILES=""
   for f in c059013l c059016l c059033l c059036l; do
     if test ! -f "$NCSB_DIR/$f.pfb"; then
       STEPMAKE_WARN($NCSB_DIR does not contain $f.pfb.)
     else
-      NCSB_SOURCE_FILES="$NCSB_DIR/$f.pfb $NCSB_SOURCE_FILES"
+      _NCSB_SOURCE_FILES_="$NCSB_DIR/$f.pfb $_NCSB_SOURCE_FILES_"
     fi
   done
 else
@@ -78,14 +79,23 @@ else
                 | head -n 1`
       NCSB_FILE=`echo $NCSB_FILE | sed 's/^\(.*\):$/\1/g'`
       NCSB_FILE=`$PYTHON "$srcdir/scripts/auxiliar/readlink.py" $NCSB_FILE`
-      NCSB_SOURCE_FILES="$NCSB_FILE $NCSB_SOURCE_FILES"
+      _NCSB_SOURCE_FILES_="$NCSB_FILE $_NCSB_SOURCE_FILES_"
     done
+    NCSB_DIR=`AS_DIRNAME($NCSB_FILE)`
   else
     AC_MSG_RESULT(not found)
echo "Can't find Century Schoolbook files. Install FontConfig's fc-list,"
     echo "or use --with-ncsb-dir"
   fi
 fi
+NCSB_SOURCE_FILES=""
+for f in $_NCSB_SOURCE_FILES_; do
+  if test "`grep Cyrillic "$f"`" = ""; then
+    STEPMAKE_WARN($f does not have Cyrillic characters.)
+  else
+    NCSB_SOURCE_FILES="$f $NCSB_SOURCE_FILES"
+  fi
+done
 AC_MSG_RESULT($NCSB_SOURCE_FILES)

 AC_LANG([C++])
Index: make/lilypond-vars.make
diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make
index 57cddb16ee37c75cd6cf850deed8cf1430e3d4cb..322dd9090cd6f09c3f81ec9253d3e1652d289be1 100644
--- a/make/lilypond-vars.make
+++ b/make/lilypond-vars.make
@@ -75,6 +75,8 @@ endif

 TEXINPUTS=$(top-src-dir)/tex/::
 export TEXINPUTS
+TEXFONTMAPS=$(top-build-dir)/tex/$(outdir)::
+export TEXFONTMAPS

 export LYDOC_LOCALEDIR:= $(top-build-dir)/Documentation/po/out-www

Index: make/substitute.make
diff --git a/make/substitute.make b/make/substitute.make
index 74ba9f67d9455afba614e8652d7f4e00f36cb62d..2da2f150918b37ff18ce1de15ee85f5d2628fe78 100644
--- a/make/substitute.make
+++ b/make/substitute.make
@@ -13,6 +13,7 @@ ATVARIABLES = \
   MICRO_VERSION\
   MAJOR_VERSION\
   MINOR_VERSION\
+  NCSB_DIR\
   PACKAGE\
   PATCH_LEVEL\
   PATHSEP\
Index: scripts/build/lys-to-tely.py
diff --git a/scripts/build/lys-to-tely.py b/scripts/build/lys-to-tely.py
index 7a8684f1949b9cf50849ea65dcc2436d030319f7..b1f4b5a3c409b9687d29b502710a34df1c41e5e9 100644
--- a/scripts/build/lys-to-tely.py
+++ b/scripts/build/lys-to-tely.py
@@ -63,6 +63,21 @@ template = '''\input texinfo

 @finalout @c we do not want black boxes.

address@hidden Trick to use with proper font mappings the same NCSB fonts as
address@hidden LilyPond instead of those provided by TeX distribution
address@hidden
+%%%% code stolen from Heiko Oberdiek's `ifpdf' package
+%%%% to call \pdfmapfile only in PDF mode
+\\begingroup\\expandafter\\expandafter\\expandafter\\endgroup
+ \\expandafter\\ifx\\csname pdfoutput\\endcsname\\relax
+\\else
+  \\ifnum\\pdfoutput<1 %%%%
+  \\else
+    \\pdfmapfile{=lilypond.map}
+  \\fi
+\\fi
address@hidden tex
+
 @c fool ls-latex
 @ignore
 @author %%(author)s
Index: tex/GNUmakefile
diff --git a/tex/GNUmakefile b/tex/GNUmakefile
index 51a54a43aa8f9a4b67e00f2cc862097aabb44f32..5fa66c910f3f1f752e8ddf2c5fe8177766736db8 100644
--- a/tex/GNUmakefile
+++ b/tex/GNUmakefile
@@ -14,3 +14,5 @@ local-uninstall:
        -rmdir $(DESTDIR)$(local_lilypond_datadir)/tex

 all: $(INSTALLATION_FILES)
+
+local-WWW-1: $(outdir)/lilypond.map
Index: tex/lilypond.map.in
diff --git a/tex/lilypond.map.in b/tex/lilypond.map.in
new file mode 100644
index 0000000000000000000000000000000000000000..1e6e17869e2bde8af0f92046a9f16e00927404dd
--- /dev/null
+++ b/tex/lilypond.map.in
@@ -0,0 +1,4 @@
+pncr8r CenturySchL-Roma <@NCSB_DIR@/c059013l.pfb
+pncb8r CenturySchL-Bold <@NCSB_DIR@/c059016l.pfb
+pncri8r CenturySchL-Ital <@NCSB_DIR@/c059033l.pfb
+pncbi8r CenturySchL-BoldItal <@NCSB_DIR@/c059036l.pfb





reply via email to

[Prev in Thread] Current Thread [Next in Thread]