Skip to content

Commit d5ab6e6

Browse files
sandeep2081ehristev
authored andcommitted
package: add lohit fonts
add Lohit font to support Indian languages Signed-off-by: Sandeep Sheriker M <[email protected]>
1 parent 9ded5d3 commit d5ab6e6

File tree

3 files changed

+48
-0
lines changed

3 files changed

+48
-0
lines changed

Config.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ endmenu
3434

3535
menu "Fonts"
3636
source "$BR2_EXTERNAL_MCHP_PATH/package/noto-fonts/Config.in"
37+
source "$BR2_EXTERNAL_MCHP_PATH/package/lohit-fonts/Config.in"
3738
endmenu
3839

3940
source "$BR2_EXTERNAL_MCHP_PATH/system/Config.in"

package/lohit-fonts/Config.in

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
config BR2_PACKAGE_LOHIT_FONTS
2+
bool "Lohit Indian languages fonts"
3+
help
4+
Lohit is a font family designed to cover Indic scripts
5+
6+
https://github.com/lohit-fonts/lohit-fonts
7+
8+
if BR2_PACKAGE_LOHIT_FONTS
9+
10+
config BR2_PACKAGE_LOHIT_FONTS_FONTS
11+
string "List of fonts to install"
12+
default "devanagari"
13+
help
14+
Specify a space-separated list of fonts to install. They
15+
correspond to the directory of the font within lohit Font
16+
directory code base. For example, devanagari, kannada.
17+
endif

package/lohit-fonts/lohit-fonts.mk

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
################################################################################
2+
#
3+
# lohit fonts
4+
#
5+
################################################################################
6+
7+
LOHIT_FONTS_VERSION = 20140220
8+
LOHIT_FONTS_SITE = https://releases.pagure.org/lohit
9+
LOHIT_FONTS_SOURCE = lohit-ttf-$(LOHIT_FONTS_VERSION).tar.gz
10+
11+
LOHIT_FONTS_LICENSE = OFL-1.1
12+
LOHIT_FONTS_LICENSE_FILES += OFL.txt
13+
14+
LOHIT_FONTS_FONTS = \
15+
$(call qstrip,$(BR2_PACKAGE_LOHIT_FONTS_FONTS))
16+
17+
define LOHIT_FONTS_EXTRACT_CMDS
18+
$(call suitable-extractor,$(LOHIT_FONTS_SOURCE)) $(LOHIT_FONTS_DL_DIR)/$(LOHIT_FONTS_SOURCE) | \
19+
$(TAR) --strip-components=1 -C $(@D) $(TAR_OPTIONS) -
20+
endef
21+
22+
#ttffile = "$(shell echo "$f" | sed 's/.*/\u&/')"
23+
define LOHIT_FONTS_INSTALL_TARGET_CMDS
24+
$(foreach f, $(LOHIT_FONTS_FONTS), \
25+
mkdir -p $(TARGET_DIR)/usr/share/fonts/truetype/lohit-$(f)
26+
$(INSTALL) -m 0644 -t $(TARGET_DIR)/usr/share/fonts/truetype/lohit-$(f) $(@D)/Lohit-$(shell echo "$f" | sed 's/.*/\u&/').ttf
27+
)
28+
endef
29+
30+
$(eval $(generic-package))

0 commit comments

Comments
 (0)