Re: [lltx] Luaotfload still broken

2024-02-29 Thread Marcel Fabian Krüger
On Thu, Feb 29, 2024 at 10:25:08PM +0100, Bruno Voisin via tex-live wrote: > Some further testing, and a clarification of my earlier message to tex-live. > > The following happens on the Mac, when typesetting a file with content > > % !TEX TS-program = LuaLaTeX > \documentclass{article} >

Re: [lltx] Fwd: tl24 pretest

2024-02-29 Thread Marcel Fabian Krüger
Hi, On Thu, Feb 29, 2024 at 03:37:08AM +0100, Reinhard Kotucha via lualatex-dev wrote: > When I run > > luaotfload-tool -u -f --cache=show > > on Linux I get in LeX Live 2023 > > [...] > > and luatex-cache/generic/fonts/otl/ contains 26 files > > In LeX Live 2024 I get > > [...] > > and

Re: [lltx] Fwd: tl24 pretest

2024-02-29 Thread Marcel Fabian Krüger
On Thu, Feb 29, 2024 at 07:57:57AM +0100, Uwe Siart wrote: > Just let me report back that this issue disappeared with today's update > of luaotfload in both TL24 and TL23. > > I don't have expertise to judge what was the actual problem. But to me > it really looked like a windows specific path

Re: [Dev-luatex] luaotfload strange message

2022-12-17 Thread Marcel Fabian Krüger
Hi, please write add an issue in the luaotfload bug tracker (https://github.com/latex3/luaotfload/issues/new) for this and include a minimal example document, the full log file and the output of luaotfload-tool --list="familyname:*cambria*" --fields="plainname,fullpath,version" On Sun, Dec

[Dev-luatex] Dropped kerning around automatic hyphens

2022-11-27 Thread Marcel Fabian Krüger
Hi, currently LuaTeX does not insert kerning between hyphens and characters before discretionary hyphens if the hyphen was inserted automatically. Take for example (here `a` is used as hyphenation character to simulate a font where kerning with the hyphen is mmre common than in cmr):

[Dev-luatex] Wrong tail in node.ligaturing

2022-11-27 Thread Marcel Fabian Krüger
Hi, in LuaTeX node.ligaturing should return the head and the tail of the list after ligatures got applied. But in the case that the tail of the new list is a discretionary the current code returns the passed in tail instead, assuming that it didn't change. This breaks if the discretionary node

Re: [Dev-luatex] letter spacing in display math

2022-09-23 Thread Marcel Fabian Krüger
On Fri, Sep 23, 2022 at 11:04:18PM +0200, blum...@fi.muni.cz wrote: > Hello, > > using fonts with additional letter spacing does not seem to work in > display formulae. (Not sure whether it's a bug in luatex or whether I > should report it to luaotfload instead.) Hi, It's not a LuaTeX bug,

Re: [Dev-luatex] Problem with directlua and synctex_tag

2022-03-28 Thread Marcel Fabian Krüger
On Mon, Mar 28, 2022 at 06:53:30PM +0200, Jérôme LAURENS wrote: > Things seem not as simple as you suggest, at least on luatex 1.13.2. > > In next example, synctex_tag and synctex_line both survive the first > \directlua call, so the state is not gone, which is a good thing > > \directlua{ >

[NTG-context] gzip.compress in ConTeXt mkiv

2022-03-01 Thread Marcel Fabian Krüger via ntg-context
Hi, The following document \directlua{ local arch = gzip.compress"I will become much much smaller, once the overhead is compensated" local orig = gzip.decompress(arch) print(arch:len(), orig:len(), orig) } \starttext \stoptext used to work in ConTeXt mkiv and still works in

Re: [Dev-luatex] Make the late_lua node accessible from the executed code

2022-02-28 Thread Marcel Fabian Krüger
On Mon, Feb 28, 2022 at 08:15:41PM +0100, luigi scarso wrote: > On Mon, Feb 28, 2022 at 1:02 PM Marcel Fabian Krüger > wrote: > > > Hi, > > > > one issue I regularly encounter with late_lua whatits is that they don't > > allow the executed code to determine

[Dev-luatex] Make the late_lua node accessible from the executed code

2022-02-28 Thread Marcel Fabian Krüger
Hi, one issue I regularly encounter with late_lua whatits is that they don't allow the executed code to determine which node is currently executed. Especially this means that attributes and properties can't be reliably accessed and the code can't access related nodes next to the late_lua node.

[Dev-luatex] Weird behavior of \exceptionpenalty

2022-02-24 Thread Marcel Fabian Krüger
Hi, in an discussion on TeX StackExchange \exceptionpenalty came up and it's current behavior seems a bit odd and is at odds with the documentation: According to the manual: > Because we introduced penalties in discretionary nodes, the exception syntax > now > also can take a penalty

Re: [Dev-luatex] os.uname on 64 bit Windows

2021-12-22 Thread Marcel Fabian Krüger
On Wed, Dec 22, 2021 at 09:54:42PM +0100, Reinhard Kotucha wrote: > Currently I get "x86_64" on Linux. Will it be sufficient check > whether the string ends with '64' in order to determine reliably > whether I'm on a 64 bit machine? That would be nice because > conditional code or table lookups

Re: [XeTeX] AMS/CM fonts in OpenType/CFF format

2021-11-17 Thread Marcel Fabian Krüger
On Wed, Nov 17, 2021 at 10:29:09AM +, Philip Taylor (Hellenic Institute) wrote: > Many thanks for your comments, Marcel, but I am still somewhat confused.  > The XeTeX manual says : > > > This distinction between file name lookups and system font name lookups > > is crucial > > to

Re: [XeTeX] AMS/CM fonts in OpenType/CFF format

2021-11-17 Thread Marcel Fabian Krüger
On Tue, Nov 16, 2021 at 11:54:23AM +, Philip Taylor (Hellenic Institute) wrote: > > % !TeX Program=XeTeX > > > > > > \font \cmr = "cmr9" > > > > \cmr > > > > The quick brown fox jumps right over the laxy dog's back. > > > > \end > > > and found, to my complete surprise, that the text in

Re: [NTG-context] ConTeXt inserts additional dots for Iosevka font

2021-09-11 Thread Marcel Fabian Krüger via ntg-context
Hi, On Sun, Sep 12, 2021 at 12:01:08AM +0200, Hans Hagen wrote: > > \definefontfeature > >[default:test] > >[default] > >[cv36=2,cv26=6] > > What is the number supposed to indicate ? It is not an alternate, right? Actually it is an alternate, but only partially. >

[NTG-context] ConTeXt inserts additional dots for Iosevka font

2021-09-11 Thread Marcel Fabian Krüger via ntg-context
Hi, ConTeXt has some issues with the character variant features of the Iosevka font available at https://github.com/be5invis/Iosevka/releases/download/v10.1.1/super-ttc-iosevka-10.1.1.zip E.g. the following document \definefontfeature [default:test] [default]

Re: [NTG-context] Failure when loading variable font

2021-08-15 Thread Marcel Fabian Krüger via ntg-context
Hi, On Sat, Aug 14, 2021 at 09:05:45PM +0200, Hans Hagen wrote: > that's because since then we check for the cycle (otherwise artifacts) > > it probably relates to these extra points (the 'standard' is somewhat fuzzy > in that respect also because some fonts have them and some don't so it's the

Re: [Dev-luatex] Improvements for glyph_stream_provider with TTF fonts

2021-08-09 Thread Marcel Fabian Krüger
On Sun, Aug 08, 2021 at 06:22:02PM +0200, luigi scarso wrote: > On Sun, Aug 8, 2021 at 1:32 PM luigi scarso wrote: > > > > > > > On Sun, Aug 8, 2021 at 1:27 PM Marcel Fabian Krüger > > wrote: > > > >> > >> /* > >>

Re: [Dev-luatex] Improvements for glyph_stream_provider with TTF fonts

2021-08-08 Thread Marcel Fabian Krüger
Hi, On Sun, Aug 08, 2021 at 12:19:36PM +0200, luigi scarso wrote: > Patch is now ok, but I am perplexed by this line > > -run_callback(callback_id, "ddd->L", tex_font, > g->gd[i].gid, streamprovider, ); > +run_callback(callback_id, "ddd->L", tex_font, >

Re: [Dev-luatex] Improvements for glyph_stream_provider with TTF fonts

2021-08-07 Thread Marcel Fabian Krüger
On Sat, Aug 07, 2021 at 10:43:35AM +0200, luigi scarso wrote: > On Sat, Aug 7, 2021 at 2:30 AM Marcel Fabian Krüger wrote: > > > > > An example implementation is attached. > > > > > $> dos2unix streamprovider3.patch > > $> patch patching file tt_

[Dev-luatex] Improvements for glyph_stream_provider with TTF fonts

2021-08-06 Thread Marcel Fabian Krüger
Hi, while working with the glyph_stream_provider callback I noticed that it has some issues, especially around TTF fonts. Especially LuaTeX analyzes the glyph streams *before* the callback get involved to identify composite glyphs. If composite glyphs are found, the corresponding components get

Re: [Dev-luatex] [PATCH] luaharfbuzz: Provide interface for variable fonts

2021-08-04 Thread Marcel Fabian Krüger
On Tue, Aug 03, 2021 at 11:51:16AM +0200, luigi scarso wrote: > Patches applied, but I don't have variation.c, which is mentioned > in luaharfbuzz.am.patch > and so variation.c.patch cannot be applied . > Sadly I introduced a bug here: Named instances queried from face objects use 1-based

Re: [Dev-luatex] [PATCH] luaharfbuzz: Provide interface for variable fonts

2021-08-03 Thread Marcel Fabian Krüger
On Tue, Aug 03, 2021 at 11:51:16AM +0200, luigi scarso wrote: > On Mon, Aug 2, 2021 at 8:40 PM Marcel Fabian Krüger wrote: > > > > > > 1) why 2 files ? > > > > Whenever I checkout the sources from git, svn or the web interface I get > > files > > w

Re: [Dev-luatex] [PATCH] luaharfbuzz: Provide interface for variable fonts

2021-08-02 Thread Marcel Fabian Krüger
On Mon, Aug 02, 2021 at 07:12:56PM +0200, luigi scarso wrote: > On Mon, Aug 2, 2021 at 6:57 PM Marcel Fabian Krüger wrote: > > > Hi, > > > > please consider the attached patch for luahbtex. It adds a Lua interface > > for HarfBuzz's functions around variable fo

Re: [Dev-luatex] LuaTeX doesn't discard empty paragraphs when textdir is used

2021-08-02 Thread Marcel Fabian Krüger
On Mon, Aug 02, 2021 at 05:55:18PM +0200, luigi scarso wrote: > On Mon, Aug 2, 2021 at 5:52 PM Marcel Fabian Krüger wrote: > > I attached a patch which adds a \emptyparmode parameter with three > > possible states: > > > > - 0: Never ignore empty paragraphs.

Re: [Dev-luatex] LuaTeX doesn't discard empty paragraphs when textdir is used

2021-08-02 Thread Marcel Fabian Krüger
On Thu, Jul 29, 2021 at 09:54:20AM +0200, luigi scarso wrote: > On Mon, Jun 21, 2021 at 5:03 PM Marcel Krüger wrote: > > > Hi, > > > > consider the following plain LuaTeX document: > > > > \textdir TRT > > \noindent\par > > \bye > > > > without the `\textdir TRT` line or with `\textdir TLT`,

[NTG-context] No kerning across discretionary nodes in latest ConTeXt upload

2021-05-20 Thread Marcel Fabian Krüger
Hi, since the latest upload, ConTeXt no longer applies kerning across discretionary nodes: \starttext \setbox0\hbox{V\-a} \showboxdepth\maxdimen \showboxbreadth\maxdimen \tracingonline1 \showbox0 \stoptext used to show > \box0=

Re: [NTG-context] Variable OTF font resulting in invalid font due to stack overflow

2021-05-16 Thread Marcel Fabian Krüger
On Thu, May 13, 2021 at 04:23:21PM +0200, Hans Hagen wrote: > On 5/12/2021 11:46 PM, Marcel Fabian Krüger wrote: > > Hi, > > > > recently we got an interesting bug report in luaotfload (the original report > > is at https://github.com/latex3/luaotfload/issues/184) which

[NTG-context] Variable OTF font resulting in invalid font due to stack overflow

2021-05-12 Thread Marcel Fabian Krüger
Hi, recently we got an interesting bug report in luaotfload (the original report is at https://github.com/latex3/luaotfload/issues/184) which relates to the ConTeXt fontloader. Take the following ConTeXt example: \starttext \definefontfeature [default:bold] [default] [axis={weight=500}]

[Dev-luatex] Uunderdelimiter & friends and mathstyles

2021-04-18 Thread Marcel Fabian Krüger
Hi, I noticed some odd behavior about \U{under,over}delimiter/\Udelimiter{under,over} related to the applied mathstyles for the nucleus: Take the following example \input luaotfload.sty \font\lmmath"Latin Modern Math:script=math,mode=base" \font\scriptlmmath"Latin Modern

[Dev-luatex] [fs]io.readinteger4 produces excessively small negative values

2021-03-06 Thread Marcel Fabian Krüger
Hi, Look at the texlua script: print(sio.readinteger4(string.pack(">i", -1), 1)) It would be expected that this prints "-1", but at least is should print a number in the range of 4-byte signed integers (-2147483648 -- 2147483647). Instead it prints -4294967297. The same issue appears with

[Dev-luatex] Including PDF images with page /Metadata streams

2021-02-28 Thread Marcel Fabian Krüger
Hi, (corresponding bug report for LaTeX: https://tex.stackexchange.com/questions/585289/corrupt-pdf-with-includegraphics?noredirect=1#comment1471060_585289 ) when LuaTeX includes a PDF file in which a Page object contains a Metadata stream, then the output is a invalid PDF file since LuaTeX

Re: [Dev-luatex] [PATCH] Nested discretionaries

2021-02-18 Thread Marcel Fabian Krüger
On Wed, Feb 17, 2021 at 12:12:40PM +0100, luigi scarso wrote: > On Wed, Feb 17, 2021 at 10:10 AM luigi scarso > wrote: > > > > > > > On Tue, Feb 16, 2021 at 3:27 PM Marcel Fabian Krüger > > wrote: > > > >> Hi, > >> > >> as doc

[Dev-luatex] [PATCH] Nested discretionaries

2021-02-16 Thread Marcel Fabian Krüger
Hi, as documented in the manual, LuaTeX supports a restricted form of nested discretionaries to handle cases like "of\-f\-ice" with ffi/ff/fi ligatures. Sadly this does not seem to work correctly. Take for example the document: \pretolerance-1 \parfillskip0pt \setbox0\hbox{off-}

Re: [luatex] Very recent breakage luatex85.sty and cmap.sty

2021-02-05 Thread Marcel Fabian Krüger
On Fri, Feb 05, 2021 at 12:18:29PM +0100, Ulrike Fischer wrote: > But the behaviour imho shouldn't depend on luatex85: > > If you want the cmaps then it should do it also without luatex85, > and if you don't want them it should exist also with luatex85. > The reason this currently isn't done

Re: [luatex] Very recent breakage luatex85.sty and cmap.sty

2021-02-04 Thread Marcel Fabian Krüger
Forgot a \protected (and tested it without uncommenting the cmap package...). Please try again with the attached version. On Fri, Feb 05, 2021 at 06:59:08AM +0900, Norbert Preining wrote: > > Could you please test the attached version of cmap.sty before I upload > >

Re: [luatex] Very recent breakage luatex85.sty and cmap.sty

2021-02-04 Thread Marcel Fabian Krüger
On Fri, Feb 05, 2021 at 06:21:29AM +0900, Norbert Preining wrote: > Note that the luatex85, cmap, **and** the tabular is necessary. > > The error is > (/home/norbert/tl/2020/texmf-dist/tex/latex/base/ts1cmr.fd)<> > ! Undefined control sequence. > reserved@a ...ng endcsname

[Dev-luatex] Duplicated italic correction in do_delimiter

2021-01-30 Thread Marcel Fabian Krüger
Hi, take the following document: \font\extend ntxexx at 10pt \textfont3=\extend \showboxdepth\maxdimen \showboxbreadth\maxdimen \setbox0=\hbox{$ \big) $} \showbox0 \bye It writes to the log: > \box0= \hbox(8.5+3.1125)x4.72997, direction TLT .\mathon .\hbox(8.5+3.1125)x4.72997, direction TLT

Re: [NTG-context] Generic fontloader and flush_components

2020-12-27 Thread Marcel Fabian Krüger
On Sun, Dec 27, 2020 at 10:50:03PM +0100, Hans Hagen wrote: > On 12/27/2020 7:19 PM, Marcel Fabian Krüger wrote: > > Hi, > > > > in font-ots.lua (which becomes part of the generic fontloader) > > nuts.flush_components is used, while it seems to be defined for > >

[NTG-context] Generic fontloader and flush_components

2020-12-27 Thread Marcel Fabian Krüger
Hi, in font-ots.lua (which becomes part of the generic fontloader) nuts.flush_components is used, while it seems to be defined for mkiv and generic in node-gcm.lua, but this file is not included in the packaged generic fontloader. Therefore the current luatex-fonts-merged.lua breaks with "trying

[Dev-luatex] Hyphenation issue regarding frozen glyph nodes

2020-11-08 Thread Marcel Fabian Krüger
Hi, as recently discussed on the luatex list there is an issue regarding hyphenation ehn a frozen glyph appears next to an explicit hyphenation character. E.g. \setbox0\hbox{X} X-\unhbox0 \bye triggers an assertion error. I noticed that with the latest experimental code a TeX error is triggered

[NTG-context] LuaMetaTex dereferences NULL pointer

2020-08-31 Thread Marcel Fabian Krüger
Hi, with the latest LuaMetaTeX upload (running on Linux x64), \normalunexpanded tries to write to address 0 and therefore segfaults: \normalunexpanded{abc} \starttext \stoptext ConTeXt fails with mtx-context | fatal error: return code: 139 The most interesting message from valgrind is

[NTG-context] CFF2 based variable fonts with SubRS

2020-08-26 Thread Marcel Fabian Krüger
Hi, I was playing with the variable font support of ConTeXt's font loader and noticed some issues. 1. While parsing the LocalSubRS and GlobalSubRS Indices, ConTeXt tries to use 16bit count fields as in CFF(1) instead of 32bit fields as in CFF2, reducing the number of found

Re: [NTG-context] set_lua freezes control sequences

2020-08-25 Thread Marcel Fabian Krüger
On Tue, Aug 25, 2020 at 04:48:27PM +0200, Hans Hagen wrote: > > I noticed that recent LuaMetaTeX versions treats control sequences > > defined using token.set_lua with `value` or `condition` as frozen and > > does not allow redefining them. Given that these are not macros, we also > > can't

[NTG-context] set_lua freezes control sequences

2020-08-25 Thread Marcel Fabian Krüger
Hi, I noticed that recent LuaMetaTeX versions treats control sequences defined using token.set_lua with `value` or `condition` as frozen and does not allow redefining them. Given that these are not macros, we also can't "unfreeze" them using \unletfrozen. 1. Would it be possible to add a

Re: [NTG-context] \scantokens in luametatex

2020-08-14 Thread Marcel Fabian Krüger
Thank you for fixing this! On Thu, Aug 13, 2020 at 02:31:51PM +0200, Marcel Fabian Krüger wrote: > Hi, > > in the current luametatex upload, \scantokens (and also \scantextokens) > behave odd: They seem to act like \detokenize, except that spaces get > catcode other instead o

[NTG-context] \scantokens in luametatex

2020-08-13 Thread Marcel Fabian Krüger
Hi, in the current luametatex upload, \scantokens (and also \scantextokens) behave odd: They seem to act like \detokenize, except that spaces get catcode other instead of catcode space: \starttext \edef\abc{\scantokens{\relax}} \abc \edef\abc{\scantextokens{\relax}} \abc \stoptext used to

[NTG-context] \fontdimen in LuaMetaTeX

2020-08-03 Thread Marcel Fabian Krüger
Hi, recent LuaMetaTeX versions no longer automatically resize the fontdimen arrays on assignments. Is there a way to manually resize them or is it necessary to reload a patched font you want more fontdimens? Also, there is an issue with the error message (I guess) for font.setfontdimen:

[NTG-context] handle_error_hook in LuaMetaTeX

2020-07-31 Thread Marcel Fabian Krüger
Hi, thanks for handling f file consition in LuaMetaTeX. While playing with that, I encountered a potential bug in the latest LuaMetaTeX version: If handle_error_hook is executed and returns any number, LuaMetaTeX segfaults. (I'm pretty sure that this still worked with the previous version)

Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Marcel Fabian Krüger
On Wed, Jul 29, 2020 at 09:37:13PM -0700, Hans Hagen wrote: > > One other question about LuaMetaTeX 2.7.1: I noticed that the > > terminal_input callback is gone. Does this mean that the current > > behaviour of basically freezing when previously terminal input was > > requested is hardcoded or is

Re: [NTG-context] Lua related change in LuaMetaTeX?

2020-07-29 Thread Marcel Fabian Krüger
> there have been a couple of bug fixes after the formal 5.4.0 release but > afaik not in the virtual machine code (which normally is the most sensitive); > i used to mark low level changes so that it got signaled (in context) but the > byte code version info changed late in 5.4 dev so i no

[NTG-context] Lua related change in LuaMetaTeX?

2020-07-28 Thread Marcel Fabian Krüger
Hi, starting with LuaMetaTeX 2.07.01, a C library I load from Lua started to segfault and valgrind indicates that it accesses invalid memory in multiple places in the middle of Lua internal functions?! The whole thing looks almost like the Lua versions in LuaMetaTeX and in the library are

Re: [NTG-context] Multiple cases of unexpected behaviour in luametatex

2020-07-03 Thread Marcel Fabian Krüger
On Fri, Jul 03, 2020 at 09:56:28PM +0200, Hans Hagen wrote: > On 7/3/2020 2:55 PM, Marcel Fabian Krüger wrote: > > Hi, > > > > I recently noticed some cases where luametatex behaved in unexpected > > ways: > > > >- The "Extra \fi&q

[NTG-context] Multiple cases of unexpected behaviour in luametatex

2020-07-03 Thread Marcel Fabian Krüger
Hi, I recently noticed some cases where luametatex behaved in unexpected ways: - The "Extra \fi" error isn't triggered, instead an extra `\fi` freezes luametatex. (Can be reproduced by compiling a document which only consists of a single \fi) - token.new can only create some `data`

Re: [NTG-context] Yet another cornercase of ^^ handling in LuaMetaTeX

2020-06-17 Thread Marcel Fabian Krüger
On Wed, Jun 17, 2020 at 03:43:49PM +0200, Hans Hagen wrote: > On 6/17/2020 12:10 PM, Marcel Fabian Krüger wrote: > > On Mon, Jun 15, 2020 at 04:16:06PM +0200, Hans Hagen wrote: > > > > > > ah, i removed some doee that i though was never seen; i'll add that bit > &

[NTG-context] \the\font in luametatex

2020-06-13 Thread Marcel Fabian Krüger
Hi, in the latest luametatex version, \the\font does ... something weird: E.g. with a current, fully updated lmtx, I get for \starttext \showthe\font \stoptext the output > }\ifempty \currentstyleparameter \else \dousecurrentstyleparameter \fi instead of the expected >

Re: [NTG-context] Changed behavior of ^^ in csname

2020-06-12 Thread Marcel Fabian Krüger
Hi, thank you for fixing this in the latest version. I found another problem with ^^, this time when followed by hexadecimal digits: \starttext \normalsupmarkmode\zerocount \catcode\circumflexasciicode=\superscriptcatcode% Ensure correct catcodes \let\ß\relax \show\ß % Shows "> \ß=\relax", no

Re: [NTG-context] Changed behavior of ^^ in csname

2020-06-11 Thread Marcel Fabian Krüger
On Thu, Jun 11, 2020 at 07:51:56PM +0200, Hans Hagen wrote: > On 6/11/2020 12:24 PM, Marcel Fabian Krüger wrote: > > > shows exactly the same behavior. > Looks like i don't catch the case where a cs is constructed, so i'll add > some checking there too (it is tempting to remove

Re: [NTG-context] Changed behavior of ^^ in csname

2020-06-11 Thread Marcel Fabian Krüger
On Thu, Jun 11, 2020 at 10:07:34AM +0200, Hans Hagen wrote: > On 6/11/2020 4:06 AM, Marcel Fabian Krüger wrote: > > Hi, > > > > I noticed that in the latest LMTX version, ^^ (with ^ of catcode 7) > > is no longer interpreted inside csnames. Is this int

[NTG-context] Changed behavior of ^^ in csname

2020-06-10 Thread Marcel Fabian Krüger
Hi, I noticed that in the latest LMTX version, ^^ (with ^ of catcode 7) is no longer interpreted inside csnames. Is this intentional? (Example: \starttext \catcode\circumflexasciicode=\superscriptcatcode% Ensure correct catcodes \show ^^41 % This still works and shows "> the letter A"

[NTG-context] \Umathcodenum and get...dir in lmtx

2020-05-28 Thread Marcel Fabian Krüger
Hi, I had two issues with luametatex: The manual documents getters and setters for the directions: The direction states can be queried and set with: tex.gettextdir() tex.getpardir() tex.setmathdir() tex.getlinedir() tex.settextdir() tex.setpardir() tex.getmathdir() tex.setlinedir()

Re: [NTG-context] \read segfaults in lmtx

2020-05-20 Thread Marcel Fabian Krüger
On Wed, May 20, 2020 at 12:13:01PM +0200, Hans Hagen wrote: > On 5/20/2020 2:39 AM, Marcel Fabian Krüger wrote: > > Hi, > > > > using \read on any existing file seems to trigger a > > segfault on lmtx. For example, take the document > > > > \starttext

[NTG-context] \read segfaults in lmtx

2020-05-19 Thread Marcel Fabian Krüger
Hi, using \read on any existing file seems to trigger a segfault on lmtx. For example, take the document \starttext \newread\myread \openinputfile\myread{test} \read\myread to \abc \closeinputfile\myread \stoptext where test.tex is any file (It doesn't matter if the file is empty or not). On my

[Dev-luatex] Lower limit for math operators lost if kern <= 0

2020-04-20 Thread Marcel Fabian Krüger
Look at the following document: \Umathlimitbelowbgap\displaystyle0pt \Umathlimitbelowvgap\displaystyle0pt $$ \sum_a^b $$ \bye Here the `a` subscript gets lost. In mlist.c, make_op, line 3324 the subscript (stored in variable `z`) is never coupled with the previous node if

Re: [Dev-luatex] Strings in LuaTeX's pdfe

2020-04-07 Thread Marcel Fabian Krüger
On Sun, Apr 05, 2020 at 12:46:28PM +0200, luigi scarso wrote: > On Sun, Apr 5, 2020 at 12:35 PM Hans Hagen wrote: > > > > > adding an extra return value is no big deal but we can't predict > > incompatibilities (and we're not assumed to introduce these) > > > > no modification, in case we will

[Dev-luatex] Strings in LuaTeX's pdfe

2020-04-02 Thread Marcel Fabian Krüger
Hi, I recently tried to do something with the embedded pdfe library and noticed that accessing strings comes with certain problems. PDF strings are always returned in raw form without the surrounding <> or (), so any script using them will need to know if it is a hex string or a "normal" ()

Re: [Dev-luatex] node.get_properties_table is broken

2020-03-31 Thread Marcel Fabian Krüger
On Mon, Mar 30, 2020 at 01:27:11AM +0200, Hans Hagen wrote: > On 3/29/2020 6:03 PM, Marcel Fabian Krüger wrote: > > > Here a property is set using node.setproperty and then we try to access > > it through different methods. All of them work, except for > > node.get_

[Dev-luatex] node.get_properties_table is broken

2020-03-29 Thread Marcel Fabian Krüger
Hi, the function node.get_properties_table returns a tabe which does not contain the actual node properties and also doesn't allow setting the node properties. See for example \directlua{ node.set_properties_mode(true, true) } \directlua{ local indirectprops = node.get_properties_table()

[Dev-luatex] Misleading documentation for node.setglue

2020-03-26 Thread Marcel Fabian Krüger
Hi, according to the LuaTeX manual for node.setglue: > When you pass values, only arguments that are numbers are assigned so > node.setglue(n,655360,false,65536) > will only adapt the width and shrink. This does not correspond to the actual behaviour. In practise, arguments which are not

Re: [Dev-luatex] depth of glyph nodes with y_displacement<0

2020-03-13 Thread Marcel Fabian Krüger
On Fri, Mar 13, 2020 at 03:34:04PM +0100, Hans Hagen wrote: > On 3/13/2020 3:16 PM, Marcel Fabian Krüger wrote: > > On Thu, Mar 12, 2020 at 06:43:39PM +0100, Hans Hagen wrote: > > > > This seems inconsistant. Is there a reason why this would be required or > > > &

Re: [Dev-luatex] depth of glyph nodes with y_displacement<0

2020-03-13 Thread Marcel Fabian Krüger
On Thu, Mar 12, 2020 at 06:43:39PM +0100, Hans Hagen wrote: > > This seems inconsistant. Is there a reason why this would be required or > > could it be changed to handle height and depth consistently? > It is (among some others) a known artifact that dates from the very early > days when we

[Dev-luatex] depth of glyph nodes with y_displacement<0

2020-03-12 Thread Marcel Fabian Krüger
Hi, I found a curiosity in LuaTeX's treatment of `y_displacement` in glyph nodes: Take the following ConTeXt example: \usetypescript[pagella] \setupbodyfont[pagella,12pt] \starttext f\char776\char776\char776\char807\char807\char807\vrule \stoptext (See

Re: [Dev-luatex] append_to_vlist with single return value broken

2020-03-07 Thread Marcel Fabian Krüger
On Sat, Mar 07, 2020 at 04:55:06PM +0100, Hans Hagen wrote: > > The problem can be fixed by always looking at stack slot -2 for the > > returned node: > actually we can as well accept nil then so that one can discard something Returning `nil` is already supported: It is documented and also works

[Dev-luatex] append_to_vlist with single return value broken

2020-03-07 Thread Marcel Fabian Krüger
Hi, according to the documentation for `append_to_vlist_filter`: > The prevdepth is also optional so it should be allowed to only return a box in which case the prevdepth value shouldn't change. But if we actually try this: \directlua{ callback.register("append_to_vlist_filter", function(b)

Re: [Dev-luatex] Some legacy fonts cause "invalid list tail, probably missing glue"

2020-02-19 Thread Marcel Fabian Krüger
On Tue, Feb 18, 2020 at 11:44:37PM +0100, luigi scarso wrote: > On Tue, Feb 18, 2020 at 12:54 PM Marcel Fabian Krüger > wrote: > > > > > A plain LuaTeX example for this would be > > > > \directlua{ > > callback.register('kerning', node.kerning) > >

Re: [Dev-luatex] Some legacy fonts cause "invalid list tail, probably missing glue"

2020-02-18 Thread Marcel Fabian Krüger
On Tue, Feb 18, 2020 at 01:55:59AM -0500, Daniel Benjamin Miller wrote: > There is an issue with lualatex which comes about when using a document such > as this (based on a discussion here >

Re: [Dev-luatex] Disappearing quoteleft in luatex

2020-02-06 Thread Marcel Fabian Krüger
On Fri, Feb 07, 2020 at 09:39:02AM +0900, Norbert Preining wrote: > Dear all, > > I see a strange thing happening with the following document all with > uptodate TeX Live: > > \documentclass{article} > \usepackage{fontspec} > \setmainfont{Gaultier} > \begin{document} > Hello `World' >

[Dev-luatex] Updates for (lua)HarfBuzz

2020-01-24 Thread Marcel Fabian Krüger
Hello, would it be possible to pull a new version of luaharfbuzz in before TeXLive 2020 is frozen? There hasn't been an official release, but there are some new interfaces which would be very useful for luaotfload. There are also at least two bugs in HarfBuzz affecting luaotfload for which the

[Dev-luatex] require doesn't get recorded

2019-11-07 Thread Marcel Fabian Krüger
Hi, based on an observation by Karl Berry on the TeX Live list I discovered an inconsistency in LuaTeX's handling of `-recorder`: While LuaTeX does record files loaded through `loadfile`, files loaded through `require` are ignored: For example if the current directory contains two empty files

Re: [Dev-luatex] Revive Type 3 fonts

2019-11-07 Thread Marcel Fabian Krüger
On Wed, Oct 30, 2019 at 08:32:45PM +0100, luigi scarso wrote: > Thank you for the patch. > It's a feature request, it has less priority than bugs fixing (and other > emails sent by you). Right, I already guessed as much but I thought I just send it anyway in case you find it useful :) -- Marcel

Re: [Dev-luatex] Broken \adjdemerits on Linux due to unspecified enumeration type

2019-11-05 Thread Marcel Fabian Krüger
Hi, thanks for fixing the \adjdemerits problem. One remark about the fix: The line if ( (fit_class>(fitness(r)+1)) || (fitness(r)>(fit_class+1)) ) is indented by one tab "\t" and four spaces, while all surrounding code is only indented with spaces. (Confusingly, tabs are also used as

[Dev-luatex] Revive Type 3 fonts

2019-10-30 Thread Marcel Fabian Krüger
Hey, LuaTeX currently supports only a very special kind of Type 3 fonts: They are generated for traditional TeX bitmap fonts. While this used to be the most common use case for Type3 fonts, the fully general concept of these fonts has recently been reinvented under the name of SVG fonts (and

[Dev-luatex] Broken \adjdemerits on Linux due to unspecified enumeration type

2019-10-29 Thread Marcel Fabian Krüger
Hi, current versions of LuaTeX from TeXLive for Linux (Windows is not affected) always add `\adjdemerits` when a line is more loose than the previous one, even if it is only one step more loose: Take \tracingparagraphs1 \tracingonline1 aa aa aa aa aa aa aa aa

[Dev-luatex] TTC handling

2019-10-23 Thread Marcel Fabian Krüger
Hey, in `writefont0.c` and `writefont2.c`, `ff_get_ttc_index` is called to determine the index of the font in a font collection. This uses the original filename from fd->fm->ff_name and therefore does not respect lookups done using the find_opentype_file etc. callbacks. In writefont0.c, this

[Dev-luatex] Improvement for `glyph_info`

2019-10-22 Thread Marcel Fabian Krüger
Hi, the new `glyph_info` callback is called in two pretty different cases: in `short_display(_n)` where a pretty short representation of the actual output characters is required, and in `print_font_and_char`, which creates the representation for `print_node_list`. Here, more details can be

Re: [Dev-luatex] mlist_to_hlist restriction

2019-10-02 Thread Marcel Fabian Krüger
On Wed, Oct 02, 2019 at 04:04:50PM +0300, Linas Stonys wrote: > Here is an example of what I'm talking about: > \documentclass{article} > \directlua{ > luatexbase.add_to_callback('mlist_to_hlist', > function (h, d, p) > print ("I'm here") > return node.mlist_to_hlist(h, d, p) > end, > 'mlist

Re: [Dev-luatex] mlist_to_hlist restriction

2019-10-02 Thread Marcel Fabian Krüger
On Wed, Oct 02, 2019 at 02:45:57PM +0300, Linas Stonys wrote: > Hi luatex team, > mlist_to_hlist callback requires to return a hlist. And that is a big problem > because > there is no possibility to use this callback if some style already used it. > If two different styles uses this callback

[Dev-luatex] used_font always return false

2019-09-17 Thread Marcel Fabian Krüger
Hi, the node(.direct).uses_font helpers currently always return false for glyph nodes: In the implementation static int lua_nodelib_direct_uses_font(lua_State * L) { halfword n = lua_tointeger(L,1); halfword f = lua_tointeger(L,2); halfword p; if (type(n) == glyph_node) {

[dev-context] Typo in generic fontloader code for SVG

2019-09-11 Thread Marcel Fabian Krüger
Hi, in font-ocl.lua, inkscape is called to convert SVG table entries to PDF. This also has a "poor mans variant for generic" around line 464 which is probably supposed to call io.popen, but calls io.open instead. Of course this breaks the conversion and leads to the creation of a weird file.

Re: [Dev-luatex] Assignments in runtoks

2019-09-04 Thread Marcel Fabian Krüger
On Mon, Sep 02, 2019 at 07:13:36PM +0200, luigi scarso wrote: > On Mon, Sep 2, 2019 at 10:59 AM Hans Hagen wrote: > > > > > (I will send the patches to Luigi later today.) > > > > > > r7188 | luigi.sca...@gmail.com |

[Dev-luatex] Assignments in runtoks

2019-08-29 Thread Marcel Fabian Krüger
Hello, in current versions of LuaTeX, `runtoks` does not preserve token lists of ongoing assignments. Therefore running `runtoks` inside of `\edef` or similar replace the definition with the defined value of the last inner assignment. For example: \toks0{\def\innermacro{inner}}

[Dev-luatex] Argument checking in ltexlib.c

2019-08-22 Thread Marcel Fabian Krüger
Hello, in tex_setmathparm and tex_getmathparm from ltexlib.c, `i` stores the index of the math parameter to query or set. Given that `i` is obtained through luaL_checkoption it should never have a invalid value. The function still check that `i` is in the valid range using the check if

Re: [NTG-context] \glueexpr in lmtx

2019-07-24 Thread Marcel Fabian Krüger
On Tue, Jul 23, 2019 at 12:54:45AM +0200, Hans Hagen wrote: > On 7/23/2019 1:16 AM, Marcel Fabian Krüger wrote: > > Hi, > > > > I stumbled upon some odd behaviour of \glueexpr in lmtx. Take the > > following document: > > > > \starttext > > \

[Dev-luatex] Embedding minimally used TTF fonts

2019-07-23 Thread Marcel Fabian Krüger
Hi, whenever LuaTeX loads a TTF font but only uses a single glyph, which happens to be the notdef glyph (GID=0), LuaTeX complains about (type 2): there are no glyphs in the subset Of course this isn't true, because the notdef *is* in the subset. This happens because LuaTeX always includes

[NTG-context] \glueexpr in lmtx

2019-07-23 Thread Marcel Fabian Krüger
Hi, I stumbled upon some odd behaviour of \glueexpr in lmtx. Take the following document: \starttext \the\glueexpr 0.0pt \relax \newskip\myskip \myskip=\glueexpr 0.0pt \relax \stoptext Without lmtx this works fine. Under lmtx, the *first* use of `\glueexpr`, after `\the`, works fine too. On the

[NTG-context] crappy names in the fontloader

2019-07-07 Thread Marcel Fabian Krüger
Hi everyone, under default settings, the fontloaders discards all glyph names which are considered "crappy", meaning matching the "p_crappyname" pattern in "font-oup.lua". For some names this makes a lot of sense. For example the name "uni0303" is considered "crappy" and it really provides no

Re: [luatex] Question about creating virtual fonts

2019-07-03 Thread Marcel Fabian Krüger
Dear Henri, there are two problems: First the sizes. You observed that all characters appear to have zero width and adding a size field makes the font disappear. The problem is that the size has to be given in scaled points, so your size "10" equals "10sp" or "0.00015pt". So if you specify the

[Dev-luatex] linebreak_filter

2019-06-27 Thread Marcel Fabian Krüger
Hi everyone, in current LuaTeX versions, the result of `linebreak` filter is ignored and instead it is always treated as if no node has been returned (so the internal linebreak algorithm is applied). A minimal example: \directlua{ callback.register("linebreak_filter", function(nodes) return

Re: [Dev-luatex] [PATCH] Respect find_{output,write}_file result

2019-05-31 Thread Marcel Fabian Krüger
On Mon, May 27, 2019 at 09:38:18AM +0200, luigi scarso wrote: > > [...] > > applied in experimental > Thanks. I still think ->R would make more sense than ->S though, because at least for find_write_file the documentation explicitly allows returning nil "if the file cannot be found", which I

  1   2   >