diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2015-11-20 22:05:33 +0100 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2015-11-20 22:05:33 +0100 |
commit | 4256d04d076d788428d4a8eb9a316da9d52a1622 (patch) | |
tree | c7120bd4b8576c85022f936df0e72a40c71bae37 /src/fontloader/misc/fontloader-mplib.tex | |
parent | 7baac9244235ce00255a0f61c5931585aa99163c (diff) | |
parent | cf6c8c94cc88db6564ccea266b3c6d8f7a5bb1a1 (diff) | |
download | luaotfload-4256d04d076d788428d4a8eb9a316da9d52a1622.tar.gz |
Merge pull request #291 from phi-gamma/master
pluggable fontloaders
Diffstat (limited to 'src/fontloader/misc/fontloader-mplib.tex')
-rw-r--r-- | src/fontloader/misc/fontloader-mplib.tex | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/fontloader/misc/fontloader-mplib.tex b/src/fontloader/misc/fontloader-mplib.tex index 09dd179..f9de4b2 100644 --- a/src/fontloader/misc/fontloader-mplib.tex +++ b/src/fontloader/misc/fontloader-mplib.tex @@ -106,15 +106,14 @@ %D Text items have a special handler: -\def\MPLIBtextext#1#2#3#4#5% +\def\MPLIBtextext#1#2#3#4% {\begingroup \setbox\mplibscratchbox\hbox {\font\temp=#1 at #2bp% \temp #3}% \setbox\mplibscratchbox\hbox - {\hskip#4 bp% - \raise#5 bp% + {\raise#4sp% \box\mplibscratchbox}% \wd\mplibscratchbox0pt% \ht\mplibscratchbox0pt% @@ -122,4 +121,20 @@ \box\mplibscratchbox \endgroup} +\def\MPLIBpdftext#1#2% + {\ifcsname mplib::#1\endcsname + % already done, forgotten outside convert group + \message{<reusing mplib: #1>}% + \else + \message{<embedding mplib: #1>}% + \immediate\pdfximage{#1}% we cannot remove the file as it is included last + \expandafter\edef\csname mplib::#1\endcsname{\the\pdflastximage}% + \fi + \setbox\mplibscratchbox\hbox + {\raise#2sp\hbox{\pdfrefximage\csname mplib::#1\endcsname}}% + \wd\mplibscratchbox0pt% + \ht\mplibscratchbox0pt% + \dp\mplibscratchbox0pt% + \box\mplibscratchbox} + \endinput |