has the font infrastructure of

has the font infrastructure of cloudflare pages build instances been documented somehow? i'm trying to process some open graph images with sharp (a node.js package) and i set export FONTCONFIG_PATH=${PWD}/assets/fonts at my build script as per sharp instructions (i validated at that PWD is what i might expect) but it seems like it still doesn't find my custom fonts. it's possible i'm missing something obvious here
14 Replies
bebraw
bebraw•2y ago
here's what i'm doing exactly, https://github.com/ReactFinland/future-frontend-site i guess the main question is, how to validate that fontconfig actually picked up my custom fonts
James
James•2y ago
I'm not directly familiar with fontconfig honestly, but my unofficial results show it at version 2.11.94-0ubuntu1.1 within the build image:https://cfdata.lol/products/pages/ Perhaps there's different config or things for versions?
bebraw
bebraw•2y ago
ok, that's good info. i see fontconfig is there so i imagine the problem folds to understanding how it works better is it possible to run the build image locally somehow?
James
James•2y ago
It is not, unfortunately
bebraw
bebraw•2y ago
ah, bummer
James
James•2y ago
It's based on an older version of Netlify's build image (v3.4.0), which you could source from https://github.com/netlify/build-image But there are definitely tweaks that have been made, so I wouldn't rely on it as a 1:1 representation
bebraw
bebraw•2y ago
ok, thanks a lot. i noticed setting FC_DEBUG should give more info from fontconfig so i guess that's the next natural step at least now i know for sure the env has fontconfig
James
James•2y ago
Yeah 🙂 Here's the Dockerfile for 3.4.0: https://github.com/netlify/build-image/blob/v3.4.0/Dockerfile
bebraw
bebraw•2y ago
speaking of images, is it possible to patch them somehow? it would help if i could attach deno there. now i have to pull it for each build
James
James•2y ago
unfortunately not, nope. You'll have to pull it every build
bebraw
bebraw•2y ago
ok, is there a cache for deps at least? i remember i saw something along that at netlify
James
James•2y ago
no cache either unfortunately
bebraw
bebraw•2y ago
ok, hopefully one day 🙂 thanks for help and have a nice year
James
James•2y ago
you too!
Want results from more Discord servers?
Add your server