[XeTeX] Random number primitives

Bruno Le Floch blflatex at gmail.com
Tue Dec 6 06:31:02 CET 2016

On 11/14/2016 04:47 AM, David Carlisle wrote:
> On 14 November 2016 at 09:22, Apostolos Syropoulos
> <asyropoulos at yahoo.com> wrote:
>>> Changing the source isn't the issue, are you offering also to help
>>> with user support to manage the change
>>> and explain to people why it's not possible to re-create documents
>>> that they created before they updated
>>> their tex system?
>> By following this conservative line of thought, we should
>> not use OpenType fonts and stick to plain old but good Type 1
>> fonts!
> No, not at all. There is a big difference between offering new functionality
> and offering existing functionality. when implementing existing tex features.
> xetex (far more than luatex) follows tex very closely, so that in the
> main, if you are
> not using the extended features it works exactly like tex. All I am
> suggesting is that
> design philosophy should apply here.
>> In fact, I would recommend dropping support for Type 1
>> fonts from XeTeX. If you want Type 1 fonts, use the ancient
>> engines.
>>  Also, each TeX destribution comes with all these
>> TeX-based engines. So these people can always use their
>> ancient files with no problem!
> Er no, That was entirely the point of my message.
> I was replying to your offer to change the sources of pdftex. If that were done
> people would _not_ be able to use their ancient (or even not ancient)
> files and get the same results.
> David

I had time to look more carefully at the source code in pdftex.web.  It
works by producing a stream of 28-bit integers (details don't matter
here) and rescaling that to the user's requested interval.  This means
for instance that \pdfuniformdeviate 536870912 only produces even
numbers.  This seemingly innocuous loop loops forever.

\loop\ifodd\pdfuniformdeviate 536870912\relax\else\repeat

I don't think XeTeX should adopt this bug for the sake of compatibility.
 I will not have time to implement anything in Pascal nor C in the near

Best regards,


More information about the XeTeX mailing list