From 4a13ae53c8441c1fba6d059f44f364cc7cdaa673 Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Fri, 19 Apr 2013 18:29:23 +0200 Subject: Documenting and simplifying ofm font bug handling --- luaotfload.dtx | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) (limited to 'luaotfload.dtx') diff --git a/luaotfload.dtx b/luaotfload.dtx index 8ffb8f9..03b63c1 100644 --- a/luaotfload.dtx +++ b/luaotfload.dtx @@ -910,10 +910,12 @@ end % \end{macrocode} % -% Virtual fonts are resolved via a callback. -% \luafunction{find_vf_file} derives the name of the virtual font file -% from the filename. -% (NB: \CONTEXT handles this likewise in \fileent{font-vf.lua}.) +% Before \TeX Live 2013 version, \LUATEX had a bug that made ofm fonts fail +% when called with their extension. There was a side-effect making ofm +% totally unloadable when luaotfload was present. The following lines are +% a patch for this bug. The utility of these lines is questionable as they +% are not necessary since \TeX Live 2013. They should be removed in the next +% version. % % \begin{macrocode} local Cs, P, lpegmatch = lpeg.Cs, lpeg.P, lpeg.match @@ -1120,22 +1122,19 @@ loadmodule"font-otc.lua" -- TODO check what we can drop from otfl-features loadmodule"lib-dir.lua" -- required by font-nms loadmodule"luat-ovr.lua" -if fonts and fonts.readers.tfm then - -------------------------------------------------------------------- - --- OFM; read this first - -------------------------------------------------------------------- - --- I can’t quite make out whether this is still relevant - --- as those ofm fonts always fail, even in the 2011 version - --- (mktexpk: don't know how to create bitmap font for omarabb.ofm) - --- the font loader appears to read ofm like tfm so if this - --- hack was supposed achieve that, we should excise it anyways - fonts.readers.ofm = fonts.readers.tfm - fonts.handlers.ofm = fonts.handlers.tfm --- empty anyways - fonts.formats.ofm = fonts.formats.tfm --- “type1” - --- fonts.readers.sequence[#fonts.readers.sequence+1] = "ofm" - -------------------------------------------------------------------- -end - +% \end{macrocode} +% +% +% \CONTEXT does not support ofm, these lines were added in order to make it +% work. However they do not seem necessary so they are commented for now. +% +% \begin{macrocode} +-- if fonts and fonts.readers.tfm then +-- fonts.readers.ofm = fonts.readers.tfm +-- fonts.handlers.ofm = fonts.handlers.tfm --- empty anyways +-- fonts.formats.ofm = fonts.formats.tfm --- “type1” +-- --- fonts.readers.sequence[#fonts.readers.sequence+1] = "ofm" +--end % \end{macrocode} % % -- cgit v1.2.3