groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font path issue


From: Ralph Corderoy
Subject: Re: Font path issue
Date: Sun, 21 Aug 2022 17:43:03 +0100

Hi Branden,

>             $download{"$foundry $name"}=$file;
...
> I think it _might_ be better to (a) perform that check (with the `-r`
> operator, I reckon), only adding $file to the hash if that succeeds
> and (b) skipping the validity check and hash update if the key
> ("$foundry $name") is already present.
...
> [1] On the other hand, we'd be guaranteed disk I/O for every entry that
>     can't be prediscarded.

How about making %download be a hash of lists and appending to the end
of the relevant list without checking anything.  Then run along the
relevant list when the file is actually needed to find the first, if
any, which opens.  If the open fails with ENOENT then try the next,
otherwise it's an error; if the file exists but, say, the permissions
stop me reading it, then I'd like to know.

I'm assuming quite a few of the files behind the ‘"$foundry $name"’ keys
won't be needed so this tests them lazily rather than up front.
Apologies if that's not useful, I've just dipped into the thread.

Is ‘"$foundry $name"’ a safe key given these foundry,name pairs give the
same result?

    Foo     │ Bar Xyzzy │ Foo Bar Xyzzy
    Foo Bar │ Xyzzy     │ Foo Bar Xyzzy

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]