0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

lambdaにfontを適用する方法

Last updated at Posted at 2022-12-19

フォントファイルと以下の設定ファイルをfontsフォルダに入れてzip

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
  <dir>/var/task/fonts/</dir>
  <dir>/opt/fonts</dir>
  <cachedir>/tmp/fonts-cache/</cachedir>
  <config></config>
</fontconfig>

これをlambda layerに登録したあと、使いたい関数にも追加してあげる。

最後にLambdaの環境変数に以下を追加
FONTCONFIG_PATH /opt/fonts

参考は以下。
https://medium.com/creditorwatch/aws-lambda-fonts-libfontconfig-5e837281a4ce

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?