Skip to content

Commit

Permalink
Create user fontconfig directory
Browse files Browse the repository at this point in the history
Create the fontconfig directory if it doesn't exist.
Update README.md to show how to install the script.
  • Loading branch information
esoleyman committed Apr 15, 2022
1 parent 89820fb commit 8cd5293
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 34 deletions.
29 changes: 7 additions & 22 deletions 65-fonts-syriac.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,16 @@
<its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
</its:rules>

<!-- Sans-Serif -->
<match target="pattern">
<test qual="any" name="lang">
<string>syr</string>
</test>
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="same">
<string>preferred_syriac_font</string>
</edit>
</match>
<description>Syriac specific font configuration</description>

<!-- Serif -->
<match target="pattern">
<test qual="any" name="lang">
<match>
<test compare="contains" name="lang">
<string>syr</string>
</test>
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="same">
<edit mode="prepend" name="family">
<string>preferred_syriac_font</string>
</edit>
</match>
</match>

<!-- Font sizing -->
<!--
Expand All @@ -74,14 +59,14 @@
Because the height of the fonts needs ot fit within the body size,
Syriac looks smaller than latin at the same point size.
Default pixelsize is 1.5
Default pixelsize is 2.0
-->
<match target="font">
<test name="lang" compare="contains">
<string>syr</string>
</test>
<edit name="pixelsize" mode="assign">
<times><name>pixelsize</name>, <double>1.5</double></times>
<times><name>pixelsize</name>, <double>2.0</double></times>
</edit>
</match>
</fontconfig>
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ This repository contains the [Beth Mardutho Meltho fonts](http://bethmardutho.or

The script will customize the fontconfig configuration file for one of the three script styles: Estrangelo, Serto and East Syriac and it will default to the most common font for each script style. If you need further customizations, please look into the **65-fonts-syriac.conf** under `$HOME/.config/fontconfig/conf.d/`

The fontconfig configuration file will set the font to 1.5x the ***pixelsize*** of a similar latin font. This is needed because to the smaller letter size in Syriac fonts relative to latin. You can adjust this in the configuration file.
The fontconfig configuration file will set the font to 2.0x the ***pixelsize*** of a similar latin font. This is needed because to the smaller letter size in Syriac fonts relative to latin. You can adjust this in the configuration file.

# Installation

```
chmod +x install.sh
./install.sh
```

# Regionalization

Expand Down
7 changes: 6 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ case $style_script in
esac

printf "\n Fontconfig file: %s\n" "$user_fc_dir/$user_fc_file"
if mkdir -p "$user_fc_dir/"; then
printf " [+] %s\n" "Created directory: $user_fc_dir"
else
printf " [-] %s\n" "Failed to create directory: $user_fc_dir"
fi

fc_file=`cat $basedir/$user_fc_file`
printf "$fc_file" | sed -e "s/preferred_syriac_font/${preferred_style}/g" > "$user_fc_dir/$user_fc_file"
Expand All @@ -77,4 +82,4 @@ printf "3. Updating fontconfig cache\n"

printf "\n4. Installation Complete"

exit
exit
20 changes: 10 additions & 10 deletions locale/syr
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ escape_char /
% Fax:
% Language: syr
% Territory:
% Revision: 0.1
% Date: 2020-06-07
% Revision: 0.2
% Date: 2021-01-15
% Application: general
% Users: general
% License: Public Domain
Expand All @@ -41,8 +41,8 @@ tel ""
fax ""
language "Syriac"
territory ""
revision "0.1"
date "2020-06-07"
revision "0.2"
date "2021-01-15"

category "i18n:2012";LC_IDENTIFICATION
category "i18n:2012";LC_CTYPE
Expand Down Expand Up @@ -121,7 +121,7 @@ day "<U071A><U0715> <U0712><U072B><U0712><U0710>";/
%
% Abbreviated month names (%b)
%
abmon "<U071F><U0722><U0718><U0722> <U0710><U071A><U072A><U071D><U0710>";/
abmon "<U070F><U071F><U0722> <U070F><U0712>";/
"<U072B><U0712><U071B>";/
"<U0710><U0715><U072A>";/
"<U0722><U071D><U0723><U0722>";/
Expand All @@ -130,9 +130,9 @@ abmon "<U071F><U0722><U0718><U0722> <U0710><U071A><U072A><U071D><U0710>";/
"<U072C><U0721><U0718><U0719>";/
"<U0710><U0712>";/
"<U0710><U071D><U0720><U0718><U0720>";/
"<U072C><U072B><U072A><U071D><U0722> <U0729><U0715><U0721><U071D><U0710>";/
"<U072C><U072B><U072A><U071D><U0722> <U0710><U071A><U072A><U071D><U0710>";/
"<U071F><U0722><U0718><U0722> <U0729><U0715><U0721><U071D><U0710>"
"<U070F><U072C><U072B> <U070F><U0710>";/
"<U070F><U072C><U072B> <U070F><U0712>";/
"<U070F><U071F><U0722> <U070F><U0710>"
%
% Full month names (%B)
%
Expand Down Expand Up @@ -161,9 +161,9 @@ first_workday 1
END LC_TIME

LC_MESSAGES
yesexpr "^[+1yY<U0710>]"
yesexpr "^[+1yY<U0717>]"
noexpr "^[-0nN<U0720>]"
yesstr "<U0710><U071D><U0722>"
yesstr "<U0717><U0710>"
nostr "<U0720><U0710>"
END LC_MESSAGES

Expand Down

0 comments on commit 8cd5293

Please sign in to comment.