Conversation
IndexMap to sort fonts by usage order
|
I wonder why the hash is not deterministic... Also, just to double-check: There is no multi-threading going on that could affect the order, right? |
This seems to fix the issues on 64-bit machines: https://github.com/typst/typst/actions/runs/19742335582/job/56569055041 On 32-bit machines |
|
So there are a couple of things here:
|
|
This is highly relevant then: typst/typst#7503 I actually wanted to remove But iiuc the IndexMap already fixes the problem? So maybe it's a non issue. Still the question of whether we should keep Prehashed in comemo or whether krilla is better served with its own thing. |
Yes
Krilla just copy pasted the implementation. It doesn't rely on the |
|
Investigating why the hash wasn't stable was just for peace of mind. I still think using |
|
Then, this is probably good to go? |
|
Is there any way we can feasibly test this in CI? We actually already have a test with 2 fonts that is compiled repeatedly to check it says stable, but that doesn't seem to be affected by the bug. |
|
So the issue occurred on tests these two fonts:
I'm not sure if there is anything special about these. |
|
Hmm no idea, but if it works fine for you, then it's good from my side. |
Use
IndexMapto sort fonts by usage order. If the order isn't deterministic, the PDF won't be deterministic anyway.The hashing approach previously used produces different orders on my local machine and a github actions runner.