Skip to content

Commit

Permalink
warcraft 3 reforged
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoHao committed Jan 29, 2020
1 parent c86e35f commit 129b67a
Show file tree
Hide file tree
Showing 22 changed files with 65 additions and 15 deletions.
17 changes: 5 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nowar Sans for _Warcraft III_

This is Nowar Sans, font packs for _Warcraft III_ that support all game languages. Nowar Sans is based on [Noto Sans](https://github.com/googlei18n/noto-fonts) and [Source Han Sans](https://github.com/adobe-fonts/source-han-sans).
This is Nowar Sans, font packs for _Warcraft III_ (both _Reforged_ and _Classic_) that support all game languages. Nowar Sans is based on [Noto Sans](https://github.com/googlei18n/noto-fonts) and [Source Han Sans](https://github.com/adobe-fonts/source-han-sans).

Looking for font pack for _World of Warcraft_ or _WoW Classic_? Try [Nowar Sans for _World of Warcraft_](https://github.com/nowar-fonts/Nowar-Sans).

Expand All @@ -10,20 +10,13 @@ Looking for font pack for _World of Warcraft_ or _WoW Classic_? Try [Nowar Sans
>
> <ruby>要<rt>Yào</rt><ruby><ruby>愛<rt>ài</rt><ruby>,<ruby>不要<rt>bùyào</rt><ruby><ruby>魔獸<rt>móshòu</rt><ruby>。
## Features

### Multilingual Support

![Preview](images/preview.jpg)

### Chat in <ruby>日本語<rt>Nihongo</rt></ruby>

![Nihongo](images/nihongo.jpg)

## Installation Guide

1. Choose a flavor (see below) and download it at [the download page](https://github.com/nowar-fonts/Nowar-Sans-War3/releases).
2. Unpack `NowarSansWar3-<region>-<weight>-<version>.7z` to `Warcraft III/` (or `Warcraft III Public Test/`).

### Extra Steps for _Warcraft III Classic_ (1.31 or earlier)

3. Search and launch Registry Editor and navigate to `HKCU\Software\Blizzard Entertainment\Warcraft III` (or `...\Warcraft III Public Test`).
4. Create a DWORD entry of name `Allow Local Files` and value `1`.

Expand Down Expand Up @@ -66,7 +59,7 @@ GB is a special offer that supports a superset of Chinese national standard GB 1
| -- | ------------------- | -------------- | ------------------- | ------ |
| GB | Mainland China (UI) | Mainland China | Mainland China (UI) | N/A |

* European: English, Español (AL), Português, Deutsch, Español (EU), Français, Italiano, and Русский.
* European: Deutsch, English, Español (EU), Español (AL), Français, Italiano, Polski, Português, and Русский.
* UI: Ambiguous punctations are treated as European; CJK puctations are half-width.

### Features
Expand Down
63 changes: 60 additions & 3 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,16 @@ def GetLatinFont(weight, region, feature):
encoding = "unspec"
)

def GetLatinBoldFont(weight, region, feature):
return Namespace(
weight = weight + 200,
width = 5,
family = "Latin",
region = regionalVariant[region]["Latn"],
feature = feature,
encoding = "unspec"
)

def GetHansFont(weight, region, feature):
return Namespace(
weight = weight,
Expand Down Expand Up @@ -417,19 +427,36 @@ def ParamToArgument(conf):
fontlist = {
"FRIZQT__": GetLatinFont(w, r, fea),
"THOWR___": GetLatinFont(w, r, fea),
"BLQ55Web": GetLatinFont(w, r, fea),
"BLQ85Web": GetLatinBoldFont(w, r, fea),
"NimrodMT": GetLatinFont(w, r, fea),
}

if regionalVariant[r]["Hans"]:
fontlist.update({ "dfst-m3u": GetHansFont(w, r, fea) })
fontlist.update({
"dfst-m3u": GetHansFont(w, r, fea),
"arheigb_bd": GetHansFont(w, r, fea),
})

if regionalVariant[r]["Hant"]:
fontlist.update({ "dffn_b31": GetHantFont(w, r, fea) })
fontlist.update({
"dffn_b31": GetHantFont(w, r, fea),
"arheiu20m": GetHantFont(w, r, fea),
"DFHeiLt": GetHantFont(w, r, fea),
"arlishuu20_db": GetHantFont(w, r, fea),
})

if regionalVariant[r]["ja"]:
fontlist.update({ "tt5500m_": GetJapaneseFont(w, r, fea) })

if regionalVariant[r]["ko"]:
fontlist.update({ "DFHeiMd": GetKoreanFont(w, r, fea) })
fontlist.update({
"DFHeiMd": GetKoreanFont(w, r, fea),
"2002": GetKoreanFont(w, r, fea),
"2002B": GetKoreanFont(w, r, fea),
"bl": GetKoreanFont(w, r, fea),
"DFKGothicMd": GetKoreanFont(w, r, fea),
})

makefile["rule"][pack] = {
"depend": [ "out/{}/Fonts/{}.ttf".format(target, f) for f in fontlist ],
Expand Down Expand Up @@ -515,6 +542,36 @@ def ParamToArgument(conf):
"command": [ "python set-encoding.py {}".format(ParamToArgument(enc)) ]
}

# Latin
for w, wd, fea in product(config.fontPackWeight + [ w + 200 for w in config.fontPackWeight ], [3, 5, 7], powerset(config.fontPackFeature)):
param = Namespace(
family = "Latin",
weight = w,
width = wd,
feature = fea,
)
makefile["rule"]["build/nowar/{}.otf".format(GenerateFilename(param))] = {
"depend": ["build/nowar/{}.otd".format(GenerateFilename(param))],
"command": [ "otfccbuild -O3 --keep-average-char-width $< -o $@ 2>/dev/null" ]
}
dep = ResolveDependency(param)
makefile["rule"]["build/nowar/{}.otd".format(GenerateFilename(param))] = {
"depend": [
"build/noto/{}.otd".format(GenerateFilename(dep["Latin"])),
],
"command": [
"mkdir -p build/nowar/",
"python merge.py {}".format(ParamToArgument(param))
]
}
makefile["rule"]["build/noto/{}.otd".format(GenerateFilename(dep["Latin"]))] = {
"depend": [ "source/noto/{}.otf".format(GenerateFilename(dep["Latin"])) ],
"command": [
"mkdir -p build/noto/",
"otfccdump --glyph-name-prefix latn --ignore-hints $< -o $@",
]
}

# dump `makefile` dict to actual “GNU Makefile”
makedump = ""

Expand Down
Binary file removed images/nihongo.jpg
Binary file not shown.
Binary file removed images/preview.jpg
Binary file not shown.
Binary file added source/noto/NotoSans-Black.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-BoldItalic.otf
Binary file not shown.
Binary file added source/noto/NotoSans-CondensedBlack.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-CondensedBoldItalic.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-CondensedItalic.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-CondensedLightItalic.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-CondensedMediumItalic.otf
Binary file not shown.
Binary file added source/noto/NotoSans-CondensedSemiBold.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-Italic.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-LightItalic.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-MediumItalic.otf
Binary file not shown.
Binary file added source/noto/NotoSans-SemiBold.otf
Binary file not shown.
Binary file added source/noto/NotoSans-SemiCondensedBlack.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-SemiCondensedBoldItalic.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-SemiCondensedItalic.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-SemiCondensedLightItalic.otf
Binary file not shown.
Binary file removed source/noto/NotoSans-SemiCondensedMediumItalic.otf
Binary file not shown.
Binary file added source/noto/NotoSans-SemiCondensedSemiBold.otf
Binary file not shown.

0 comments on commit 129b67a

Please sign in to comment.