HD Text - bayaraa/d2gl GitHub Wiki
Switch all text parts in game to high-definition texts. Since version 1.2.0 you can load your custom created font atlases.
Following steps to add custom font to D2GL's HD Text.
- Download HDText.zip and extract somewhere (for reference extracted into
C:\
).
Inside zip:export\
: generated atlases and glyph data will saved in this folder.charset\
: charset files that required to create font atlas.fonts\
: this just reference folder for fonts.gen.exe
: Chlumsky's msdf-atlas-gen executable. This is actual atlas generation tool.gen.py
: this is python script you have to run to create multiple atlases once (needs python installed).
- Download desired font from somewhere and put into
C:\HDText\fonts\
folder. - Open windows terminal and go to
C:\HDText\
folder.- Run
python gen.py charset\latin_cyrillic.txt fonts\Arial.ttf
- Run
- Atlas directory is
assets\atlases\
in data folder of your D2 (if you opend2gl.mpq
you will see).
Create direcory (ex:FontABC
) in this location and copy all files fromC:\HDText\export\
toFontABC\
directory. - Now time to adjustments. Put one of these config files into
assets\atlases\
. - Then start editing config file. File structure:
ID | FontName | Size | Weight | LetterSpacing | LineHeight | ShadowIntensity | OffsetX | OffsetY | SymbolOffset
- First change font names (last part of each line) then save.
0 | FontABC | 10.800 | 1.081 | 0.102 | 1.420 | 0.400 | 0.050 | -0.280 | 0.000
- Second change other parts. Except font name you can change each part by hand.
But i created custom build of D2GL can help adjusting font. Putglide3x.dll
into D2 folder from zip archive.
Run game with usual-3dfx
and open option (CTRL+O
) you can see additional tabHD Text
.
Adjust each font and copy text and save into font config file.
- First change font names (last part of each line) then save.
HD Text Font IDs
Font ID | Description |
---|---|
0 | Character life/mana/stamina texts on stats panel |
1 | All Normal texts |
2 | Character create screen title / Esc menu smaller texts |
3 | Character selection title / Esc menu bigger texts |
4 | Skill Tree level number (2 digits) |
5 | Menu screen copyright text |
6 | All Small texts (smallest) |
7 | Menu screen popup titles |
8 | NPC talking Text |
9 | Menu Button label |
10 | Menu Button label (smaller) |
11 | ? (Seems unused) |
12 | ? (Seems unused) |
13 | Messages / Heads up bubble text / Keybind configs |
14 | Tooltip text (items/skills/units etc) (Custom) |
15 | Tooltip text smaller (when text is bigger than screen) (Custom) |
16 | Dropped items label (Custom) |
17 | Level/Class text on char selection screen (Custom) |
18 | Level Entry text (Custom) |
19 | Minimap first line text/clock/fps counter (Custom) |
20 | Monster resistances text on hp bar (Custom) |
21 | Unused: For future reference (Custom) |
22 | Unused: For future reference (Custom) |
HD Text Symbols
Symbols use google's Noto Sans Symbol
font. Atlas generation is same as font atlas generation.
Added column(last column SymbolOffset
) in font config file that can adjust symbol's Y coordinate of offset.
Because it uses different font that might need additional adjustment.
Followint symbols can be used in HD text:
ˆˇˉ˘˙˚˛˜˝̧̨̦̀́̂̃̄̆̇̈̊̋̌̒–—‘’‚“”„•…‹›€⃝⃞⃟⃠⃢⃣⃤™ⅠⅡⅢⅣⅤⅥⅦⅧⅨⅩⅪⅫⅬⅭⅮⅯⅰⅱⅲⅳⅴⅵⅶⅷⅸⅹⅺⅻⅼⅽⅾⅿↀↁↂↃↅↆↇↈ↊↋←↑→↓↔↕↖↗↘↙−
⌀⌁⌂⌃⌄⌅⌆⌇⌈⌉⌊⌋⌌⌍⌎⌏⌑⌒⌓⌔⌕⌗⌜⌝⌞⌟⌢⌣〈〉⌬⌭⌮⌯⌰⌱⌲⌳⌴⌵⍼⎀⎁⎂⎃⎄⎅⎆⎇⎈⎉⎊⎋⎌⎍⎎⎏⎐⎑⎒⎓⎔⎖⎗⎘⎙⎚⎯
⎾⎿⏀⏁⏂⏃⏄⏅⏆⏇⏈⏉⏊⏋⏌⏍⏐⏑⏒⏓⏔⏕⏖⏗⏘⏙⏚⏛⏢⏣⏤⏥⏦⏧⏨
①②③④⑤⑥⑦⑧⑨⑩⑪⑫⑬⑭⑮⑯⑰⑱⑲⑳⑴⑵⑶⑷⑸⑹⑺⑻⑼⑽⑾⑿⒀⒁⒂⒃⒄⒅⒆⒇⒈⒉⒊⒋⒌⒍⒎⒏⒐⒑⒒⒓⒔⒕⒖⒗⒘⒙⒚⒛
⒜⒝⒞⒟⒠⒡⒢⒣⒤⒥⒦⒧⒨⒩⒪⒫⒬⒭⒮⒯⒰⒱⒲⒳⒴⒵ⒶⒷⒸⒹⒺⒻⒼⒽⒾⒿⓀⓁⓂⓃⓄⓅⓆⓇⓈⓉⓊⓋⓌⓍⓎⓏⓐⓑⓒⓓⓔⓕⓖⓗⓘⓙⓚⓛⓜⓝⓞⓟⓠⓡⓢⓣⓤⓥⓦⓧⓨⓩ
⓪⓫⓬⓭⓮⓯⓰⓱⓲⓳⓴⓵⓶⓷⓸⓹⓺⓻⓼⓽⓾⓿◌☊☋☌☍☓☤☥☦☧☨☩☪☫☬☭☮☯☸☹☺☻☽☾☿♀♁♂♃♄♅♆♇♈♉♊♋♌♍♎♏♐♑♒♓♩♪♫♬♭♮♯♰♱♲♳♴♵♶♷♸♹♺♻♼♽♾⚐⚑
⚒⚓⚔⚕⚖⚗⚘⚙⚚⚛⚜⚝⚢⚣⚤⚥⚦⚧⚨⚩⚭⚮⚯⚰⚱⚲⚳⚴⚵⚶⚷⚸⚹⚺⚻⚼⛎⛢⛣⛤⛥⛦⛧⛨⛩⛪⛫⛬⛭⛮⛯⛰⛱⛲⛳⛴⛵⛶⛷⛸⛹⛺⛻⛼⛽⛾⛿✝✞✟✠✡
❶❷❸❹❺❻❼❽❾❿➀➁➂➃➄➅➆➇➈➉➊➋➌➍➎➏➐➑➒➓⤡⤢
Ex: String TBL edited for horadric cube:
** Symbols don't work with BH.dll (map hack) unless made changes in BH source to support utf16 texts.