#!/usr/bin/make -f
# check fontconfig settings after installation

check: check-file check-weight check-style

check-file:
	fc-match NanumGothic file             | grep "NanumGothic.ttf$$" > /dev/null
	fc-match NanumGothic:bold file        | grep "NanumGothicBold.ttf$$" > /dev/null
	fc-match NanumGothic:extrabold file   | grep "NanumGothicExtraBold.ttf$$" > /dev/null
	fc-match NanumMyeongjo file           | grep "NanumMyeongjo.ttf$$" > /dev/null
	fc-match NanumMyeongjo:bold file      | grep "NanumMyeongjoBold.ttf$$" > /dev/null
	fc-match NanumMyeongjo:extrabold file | grep "NanumMyeongjoExtraBold.ttf$$" > /dev/null
	fc-match NanumBarunGothic file        | grep "NanumBarunGothic.ttf$$" > /dev/null
	fc-match NanumBarunGothic:bold file   | grep "NanumBarunGothicBold.ttf$$" > /dev/null

check-weight:
	test `fc-match NanumMyeongjo:bold weight`      = ":weight=200"
	test `fc-match NanumMyeongjo:extrabold weight` = ":weight=205"
	test `fc-match NanumGothic:bold weight`        = ":weight=200"
	test `fc-match NanumGothic:extrabold weight`   = ":weight=205"
	test `fc-match NanumBarunGothic:bold weight`   = ":weight=200"

check-style:
	test `fc-match NanumGothic:extrabold style`    = ":style=ExtraBold"
	test `fc-match NanumMyeongjo:extrabold style`  = ":style=ExtraBold"
