cshum / imagor

Fast, secure image processing server and Go library, using libvips
Apache License 2.0
3.46k stars 137 forks source link

Using font #429

Closed tropee-moein closed 7 months ago

tropee-moein commented 7 months ago

First of all thank you for building Imagor! I've been trying to use Inter font family and I've hit a dead end after trying everything. I can see in the logs of libvips that the font is detected but then the letter that is rendered is definitely not Inter.

What I've done so far is adding ttf file of inter in the docker image

FROM shumc/imagor:1.4.11

USER root

RUN mkdir -p /usr/share/fonts/Inter
COPY "Inter-VariableFont_slnt,wght.ttf" /usr/share/fonts/Inter

RUN fc-cache -f -v

USER nobody

And then I'm passing this label filter label(R,center,center,48,black,0,Inter)

I would actually like to use Inter SemiBold but for now even getting Inter to work would be amazing

tropee-moein commented 7 months ago

Closing this as the font was actually loaded correctly but we were having caching issues. Using Inter SemiBold did the trick (after adding the font in docker image)