Skip to content

kangear/lambda-cjk-font-layer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lambda-cjk-font-layer

A script to produce lambda layer including cjk fonts

Below is font rendering example in pdf generated with lambda-pdf-generator

image image image

build

To build CJK font layer, executing

make build 

will produces below layer package.

noto_cjk_font_layer.zip

It includes all JP, KR, SC, TC fonts

Installation

Upload zip package to your lambda layers and specify layer from your lambda.

It introduce below directory into your lambda environment

  • /opt/fonts/.fonts
  • /opt/fonts/.fontconfig

If you are using headless chrome on lambda by chrome-aws-lambda, you can set HOME environment variable as /opt/fonts and headless chrome will refers fonts as expected.

Deployment

see example/main.tf

Language specific layer

you can build language, and weight specific layers.

JP

# Regular weight layer
make build-noto jp Regular

including

  • NotoSansCJKjp Regular
  • NotoSerifCJKjp Regular

or you can specify other weights

# Bold weight layer
make build-noto jp Bold

including

  • NotoSansCJKjp Bold
  • NotoSerifCJKjp Bold
make build-ipa

including

  • IPA Gothic
  • IPA P Gothic
  • IPA Mincho
  • IPA P Mincho

KR

make build-noto kr Regular

including

  • NotoSansCJKkr Regular
  • NotoSerifCJKkr Regular

SC

make build-noto sc Regular

including

  • NotoSansCJKsc Regular
  • NotoSerifCJKsc Regular

TC

make build-noto tc Regular

including

  • NotoSansCJKtc Regular
  • NotoSerifCJKtc Regular

About

A script to produce lambda layer including cjk fonts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 69.3%
  • HCL 30.7%