texlive[46964] Build/source/texk/kpathsea: separate successful glyph
commits+karl at tug.org
commits+karl at tug.org
Wed Mar 14 23:52:12 CET 2018
Revision: 46964
http://tug.org/svn/texlive?view=revision&revision=46964
Author: karl
Date: 2018-03-14 23:52:12 +0100 (Wed, 14 Mar 2018)
Log Message:
-----------
separate successful glyph searches and filling in return structs
Modified Paths:
--------------
trunk/Build/source/texk/kpathsea/ChangeLog
trunk/Build/source/texk/kpathsea/tex-glyph.c
Modified: trunk/Build/source/texk/kpathsea/ChangeLog
===================================================================
--- trunk/Build/source/texk/kpathsea/ChangeLog 2018-03-14 21:13:06 UTC (rev 46963)
+++ trunk/Build/source/texk/kpathsea/ChangeLog 2018-03-14 22:52:12 UTC (rev 46964)
@@ -1,3 +1,9 @@
+2018-03-14 Karl Berry <karl at tug.org>
+
+ * tex-glyph.c (kpathsea_find_glyph, try_size): disentangle
+ successful searches and filling in return information.
+ Private report from Doug McKenna, 14 Mar 2018 11:51:29.
+
2018-02-26 Karl Berry <karl at freefriends.org>
* texmf.cnf (TEXMFVAR, TEXMFCONFIG, doc): 2018.
Modified: trunk/Build/source/texk/kpathsea/tex-glyph.c
===================================================================
--- trunk/Build/source/texk/kpathsea/tex-glyph.c 2018-03-14 21:13:06 UTC (rev 46963)
+++ trunk/Build/source/texk/kpathsea/tex-glyph.c 2018-03-14 22:52:12 UTC (rev 46964)
@@ -101,18 +101,18 @@
ret = try_pk ? try_format (kpse, kpse_pk_format) : NULL;
format_found = kpse_pk_format;
- if (ret == NULL && try_gf)
- {
- ret = try_format (kpse, kpse_gf_format);
- format_found = kpse_gf_format;
- }
+ if (ret == NULL && try_gf) {
+ ret = try_format (kpse, kpse_gf_format);
+ format_found = kpse_gf_format;
+ }
- if (ret != NULL && glyph_file)
- { /* Success. Fill in the return info. */
+ if (ret != NULL) { /* Success. */
+ if (glyph_file) { /* Fill in the return info. */
glyph_file->name = fontname;
glyph_file->dpi = dpi;
glyph_file->format = format_found;
}
+ }
return ret;
}
@@ -290,15 +290,16 @@
/* If mktex... succeeded, set return struct. Doesn't make sense for
`kpse_make_tex' to set it, since it can only succeed or fail,
unlike the other routines. */
- if (ret && glyph_file) {
- KPSE_GLYPH_FILE_DPI (*glyph_file) = dpi;
- KPSE_GLYPH_FILE_NAME (*glyph_file) = fontname;
- }
+ if (ret) {
+ if (glyph_file) {
+ KPSE_GLYPH_FILE_DPI (*glyph_file) = dpi;
+ KPSE_GLYPH_FILE_NAME (*glyph_file) = fontname;
+ }
/* If mktex... failed, try any fallback resolutions. */
- else {
+ } else {
if (kpse->fallback_resolutions)
- ret = try_fallback_resolutions (kpse, fontname, dpi, format, glyph_file);
+ ret = try_fallback_resolutions (kpse, fontname, dpi,format,glyph_file);
/* We're down to the font of last resort. */
if (!ret && kpse->fallback_font) {
More information about the tex-live-commits
mailing list