texlive[46982] Build/source/texk/kpathsea: distinguish glyph source

commits+karl at tug.org commits+karl at tug.org
Fri Mar 16 16:54:32 CET 2018


Revision: 46982
          http://tug.org/svn/texlive?view=revision&revision=46982
Author:   karl
Date:     2018-03-16 16:54:32 +0100 (Fri, 16 Mar 2018)
Log Message:
-----------
distinguish glyph source being fallback resolutions from fallback font

Modified Paths:
--------------
    trunk/Build/source/texk/kpathsea/ChangeLog
    trunk/Build/source/texk/kpathsea/tex-glyph.c
    trunk/Build/source/texk/kpathsea/tex-glyph.h

Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog	2018-03-16 14:02:27 UTC (rev 46981)
+++ trunk/Build/source/texk/kpathsea/ChangeLog	2018-03-16 15:54:32 UTC (rev 46982)
@@ -1,3 +1,10 @@
+2018-03-16  Karl Berry  <karl at freefriends.org>
+
+	* tex-glyph.h (kpse_glyph_source_fallback_res): new enum value
+	in kpse_glyph_source_type.
+	* tex-glyph.c (kpathsea_find_glyph): use it for `source'.
+	Private report from Doug McKenna, 14 Mar 2018 19:26:12.
+
 2018-03-14  Karl Berry  <karl at tug.org>
 
 	* tex-glyph.c (kpathsea_find_glyph, try_size): disentangle
@@ -9,6 +16,7 @@
 	* texmf.cnf (TEXMFVAR, TEXMFCONFIG, doc): 2018.
 
 2018-02-24  Hironobu Yamashita  <h.y.acetaminophen at gmail.com>
+
 	* tex-make.c (kpathsea_make_tex): Change an error message
 	"Invalid fontname" to "Invalid filename", since
 	  $ tex -fmt=-a x

Modified: trunk/Build/source/texk/kpathsea/tex-glyph.c
===================================================================
--- trunk/Build/source/texk/kpathsea/tex-glyph.c	2018-03-16 14:02:27 UTC (rev 46981)
+++ trunk/Build/source/texk/kpathsea/tex-glyph.c	2018-03-16 15:54:32 UTC (rev 46982)
@@ -1,6 +1,6 @@
 /* tex-glyph.c: search for GF/PK files.
 
-   Copyright 1993, 1994, 1995, 1996, 2008, 2009, 2011, 2017 Karl Berry.
+   Copyright 1993, 1994, 1995, 1996, 2008, 2009, 2011, 2017, 2018 Karl Berry.
    Copyright 1997, 1998, 1999, 2005 Olaf Weber.
 
    This library is free software; you can redistribute it and/or
@@ -298,8 +298,10 @@
 
     /* If mktex... failed, try any fallback resolutions.  */
     } else {
-      if (kpse->fallback_resolutions)
+      if (kpse->fallback_resolutions) {
+        source = kpse_glyph_source_fallback_res;
         ret = try_fallback_resolutions (kpse, fontname, dpi,format,glyph_file);
+      }
 
       /* We're down to the font of last resort.  */
       if (!ret && kpse->fallback_font) {
@@ -311,8 +313,9 @@
         ret = try_resolution (kpse, name, dpi, format, glyph_file);
 
         /* The fallback font at the fallback resolutions.  */
-        if (!ret && kpse->fallback_resolutions)
+        if (!ret && kpse->fallback_resolutions) {
           ret = try_fallback_resolutions (kpse, name, dpi, format, glyph_file);
+        }
       }
     }
   }
@@ -337,8 +340,8 @@
                  kpse_file_format_type format,
                  kpse_glyph_file_type *glyph_file)
 {
-    return kpathsea_find_glyph (kpse_def, passed_fontname, dpi, format,
-                                glyph_file);
+  return kpathsea_find_glyph (kpse_def, passed_fontname, dpi, format,
+                              glyph_file);
 }
 #endif
 

Modified: trunk/Build/source/texk/kpathsea/tex-glyph.h
===================================================================
--- trunk/Build/source/texk/kpathsea/tex-glyph.h	2018-03-16 14:02:27 UTC (rev 46981)
+++ trunk/Build/source/texk/kpathsea/tex-glyph.h	2018-03-16 15:54:32 UTC (rev 46982)
@@ -1,6 +1,6 @@
 /* tex-glyph.h: look for a TeX glyph font (GF or PK).
 
-   Copyright 1993, 2008, 2009, 2011 Karl Berry.
+   Copyright 1993, 2008, 2009, 2011, 2018 Karl Berry.
    Copyright 1999, 2005 Olaf Weber.
 
    This library is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@
 extern "C" {
 #endif
 
-/* This type describes the origination of a glyph font.  */
+/* This type describes the origin of a glyph font.  */
 
 typedef enum
 {
@@ -33,6 +33,7 @@
   kpse_glyph_source_normal,  /* the searched-for font: already existed */
   kpse_glyph_source_alias,   /* : was an alias for an existing file */
   kpse_glyph_source_maketex, /* : was created on the fly */
+  kpse_glyph_source_fallback_res, /* : found at fallback resolutions */
   kpse_glyph_source_fallback /* : wasn't found, but the fallback font was */
 } kpse_glyph_source_type;
 



More information about the tex-live-commits mailing list