Re: [luatex] TFM does not scale with latest tfmofm.c
Hello, I confirmed rev. 7659 works. Thanks! On 2025/02/08 18:29, luigi scarso wrote: On Sat, 8 Feb 2025 at 10:10, luigi scarso wrote: hm I think that this is wrong tex_error(err, errhelp); } z = sw ; arith_error = saved_arith_error; It should be tex_error(err, errhelp); z = sw ; } arith_error = saved_arith_error; Indeed, test.pdf should be ok. Regards Hironori KITAGAWA
Re: [luatex] TFM does not scale with latest tfmofm.c
On Sat, 8 Feb 2025 at 10:10, luigi scarso wrote: > >> hm I think that this is wrong > tex_error(err, errhelp); >} >z = sw ; >arith_error = saved_arith_error; > > It should be > tex_error(err, errhelp); > z = sw ; >} >arith_error = saved_arith_error; > Indeed, test.pdf should be ok. -- luigi test.pdf Description: Adobe PDF document
Re: [luatex] TFM does not scale with latest tfmofm.c
On Sat, 8 Feb 2025 at 10:00, Hans Hagen wrote: > On 2/8/2025 9:32 AM, luigi scarso wrote: > > > > > > On Sat, 8 Feb 2025 at 09:09, Hironori KITAGAWA via luatex > > mailto:[email protected]>> wrote: > > > > Hello all, > > > > I found that TFM-based fonts do not scale in the development > > version of LuaTeX: > > > > > > \input luaotfload.sty > > \font\la=file:lmroman10-regular.otf scaled 2000 > > \font\lb=file:lmroman10-regular.otf at 100pt > > \font\ca=cmr10 scaled 2000 > > \font\cb=cmr10 at 100pt > > \la abc\lb xyz % ==> OK > > \ca abc\cb xyz % ==> typeset in 10pt > > \bye > > > > > > I suspect the cause is the following code of font/tfmofm.c, > > which is introduced by a recent commit. > > > > if ((arith_error) || (z>= 010)) { > > char err[256]; > > const char *errhelp[] = { > > "I will ignore the scaling factor.", > > NULL > > }; > > snprintf(err, 255, "Font scaled to 2048pt or higher"); > > tex_error(err, errhelp); > > } > > z = sw ; > > arith_error = saved_arith_error; > > } > > > > > > > > Ok, I am checking it. > > - we can change z >= 010 to z > 010 so that the 2048 is > still okay but larger fonts aren't valid (for whatever reason, mostly in > order to be compatible with other engines) > > - we can in addition just clip to that max and stick to a warning, no > need to error > > but as a starter > >if ((arith_error) || (z > 010)) { > > could work ok for those choosing 2048 or some scale that results in that > value > hm I think that this is wrong tex_error(err, errhelp); } z = sw ; arith_error = saved_arith_error; It should be tex_error(err, errhelp); z = sw ; } arith_error = saved_arith_error; (As a weak excuse: My translation from pascalweb to C (a change file, too) is quite rusty. Sorry.) -- luigi
Re: [luatex] TFM does not scale with latest tfmofm.c
On 2/8/2025 9:32 AM, luigi scarso wrote: On Sat, 8 Feb 2025 at 09:09, Hironori KITAGAWA via luatex mailto:[email protected]>> wrote: Hello all, I found that TFM-based fonts do not scale in the development version of LuaTeX: \input luaotfload.sty \font\la=file:lmroman10-regular.otf scaled 2000 \font\lb=file:lmroman10-regular.otf at 100pt \font\ca=cmr10 scaled 2000 \font\cb=cmr10 at 100pt \la abc\lb xyz % ==> OK \ca abc\cb xyz % ==> typeset in 10pt \bye I suspect the cause is the following code of font/tfmofm.c, which is introduced by a recent commit. if ((arith_error) || (z>= 010)) { char err[256]; const char *errhelp[] = { "I will ignore the scaling factor.", NULL }; snprintf(err, 255, "Font scaled to 2048pt or higher"); tex_error(err, errhelp); } z = sw ; arith_error = saved_arith_error; } Ok, I am checking it. - we can change z >= 010 to z > 010 so that the 2048 is still okay but larger fonts aren't valid (for whatever reason, mostly in order to be compatible with other engines) - we can in addition just clip to that max and stick to a warning, no need to error but as a starter if ((arith_error) || (z > 010)) { could work ok for those choosing 2048 or some scale that results in that value Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -
Re: [luatex] TFM does not scale with latest tfmofm.c
On Sat, 8 Feb 2025 at 09:09, Hironori KITAGAWA via luatex
wrote:
> Hello all,
>
> I found that TFM-based fonts do not scale in the development
> version of LuaTeX:
>
>
> \input luaotfload.sty
> \font\la=file:lmroman10-regular.otf scaled 2000
> \font\lb=file:lmroman10-regular.otf at 100pt
> \font\ca=cmr10 scaled 2000
> \font\cb=cmr10 at 100pt
> \la abc\lb xyz % ==> OK
> \ca abc\cb xyz % ==> typeset in 10pt
> \bye
>
>
> I suspect the cause is the following code of font/tfmofm.c,
> which is introduced by a recent commit.
>
> if ((arith_error) || (z>= 010)) {
>char err[256];
>const char *errhelp[] = {
> "I will ignore the scaling factor.",
> NULL
>};
>snprintf(err, 255, "Font scaled to 2048pt or higher");
>tex_error(err, errhelp);
> }
> z = sw ;
> arith_error = saved_arith_error;
> }
>
>
Ok, I am checking it.
--
luigi
