From 014e2ed872d6952fad87d28136813b6dee70e44d Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Thu, 20 Aug 2026 16:21:38 +1000 Subject: [PATCH] Fix learning_approximation FONTPATH: _fonts/ -> fonts/ (unbreaks the cache build) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 2026-08-20 cache.yml run (32331172292) failed on Build HTML with FileNotFoundError: '_fonts/SourceHanSerifSC-SemiBold.otf' while executing learning_approximation.md's import cell. The engine's i18n-font-config rule hard-codes _fonts/; this edition keeps the font at lectures/fonts/, and every other font-loading lecture here (116 references across 36 lectures) uses fonts/. This was the one known seed gotcha the #261 gap-fill missed — the PR preview build tolerated the execution error as a warning, so it surfaced only when the strict cache build ran. One-line change; the asset exists at lectures/fonts/SourceHanSerifSC-SemiBold.otf. Co-Authored-By: Claude Opus 5 (1M context) --- lectures/learning_approximation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/learning_approximation.md b/lectures/learning_approximation.md index f63ffae8..883371ba 100644 --- a/lectures/learning_approximation.md +++ b/lectures/learning_approximation.md @@ -101,7 +101,7 @@ import pandas as pd import quantecon as qe import matplotlib.pyplot as plt import matplotlib as mpl # i18n -FONTPATH = "_fonts/SourceHanSerifSC-SemiBold.otf" # i18n +FONTPATH = "fonts/SourceHanSerifSC-SemiBold.otf" # i18n mpl.font_manager.fontManager.addfont(FONTPATH) # i18n mpl.rcParams['font.family'] = ['Source Han Serif SC'] # i18n from scipy.optimize import brentq