Files
2025-02-05 06:19:18 +00:00

9 lines
8.7 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/font - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="datum/font.html#var">Var Details</a> - <a href="datum/font.html#proc">Proc Details</a></header><main><h1>font <aside>/<a href="datum.html">datum</a>/<a href="datum/font.html">font</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L2"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 2"></a></h1><p>A font datum, it exists to define a custom font to use in a span style later.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Vars</h2></td></tr><tr><th><a href="datum/font.html#var/ascent">ascent</a></th><td>distance above baseline (including whitespace)</td></tr><tr><th><a href="datum/font.html#var/average_width">average_width</a></th><td>average character width</td></tr><tr><th><a href="datum/font.html#var/default_character">default_character</a></th><td>default character (for undefined chars)</td></tr><tr><th><a href="datum/font.html#var/descent">descent</a></th><td>distance below baseline</td></tr><tr><th><a href="datum/font.html#var/end">end</a></th><td>last character in metrics</td></tr><tr><th><a href="datum/font.html#var/ex_leading">ex_leading</a></th><td>external leading vertical space, just plain blank</td></tr><tr><th><a href="datum/font.html#var/font_family">font_family</a></th><td>The font file we link to.</td></tr><tr><th><a href="datum/font.html#var/height">height</a></th><td>total height of a line</td></tr><tr><th><a href="datum/font.html#var/in_leading">in_leading</a></th><td>internal leading vertical space, for accent marks</td></tr><tr><th><a href="datum/font.html#var/max_width">max_width</a></th><td>maximum character width</td></tr><tr><th><a href="datum/font.html#var/metrics">metrics</a></th><td>Font features and metrics
Generated by Lummox's dmifontsplus (https://www.byond.com/developer/LummoxJR/DmiFontsPlus)
Note: these variable names have been changed, so you can't straight copy/paste from dmifontsplus.exe
list of font size/spacing metrics</td></tr><tr><th><a href="datum/font.html#var/name">name</a></th><td>Font name, just so people know what to put in their span style.</td></tr><tr><th><a href="datum/font.html#var/overhang">overhang</a></th><td>extra width, such as from italics, for a line</td></tr><tr><th><a href="datum/font.html#var/start">start</a></th><td>first character in metrics</td></tr><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/font.html#proc/get_metrics">get_metrics</a></th><td>Get font metrics
From Lummox's dmifontsplus (https://www.byond.com/developer/LummoxJR/DmiFontsPlus)</td></tr></table><h2 id="var">Var Details</h2><h3 id="var/ascent"><aside class="declaration">var </aside>ascent <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L17"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 17"></a></h3><p>distance above baseline (including whitespace)</p><h3 id="var/average_width"><aside class="declaration">var </aside>average_width <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L21"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 21"></a></h3><p>average character width</p><h3 id="var/default_character"><aside class="declaration">var </aside>default_character <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L31"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 31"></a></h3><p>default character (for undefined chars)</p><h3 id="var/descent"><aside class="declaration">var </aside>descent <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L19"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 19"></a></h3><p>distance below baseline</p><h3 id="var/end"><aside class="declaration">var </aside>end <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L37"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 37"></a></h3><p>last character in metrics</p><h3 id="var/ex_leading"><aside class="declaration">var </aside>ex_leading <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L29"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 29"></a></h3><p>external leading vertical space, just plain blank</p><h3 id="var/font_family"><aside class="declaration">var </aside>font_family <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L6"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 6"></a></h3><p>The font file we link to.</p><h3 id="var/height"><aside class="declaration">var </aside>height <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L15"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 15"></a></h3><p>total height of a line</p><h3 id="var/in_leading"><aside class="declaration">var </aside>in_leading <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L27"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 27"></a></h3><p>internal leading vertical space, for accent marks</p><h3 id="var/max_width"><aside class="declaration">var </aside>max_width <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L23"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 23"></a></h3><p>maximum character width</p><h3 id="var/metrics"><aside class="declaration">var </aside>metrics <aside> /list</aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L13"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 13"></a></h3><p>Font features and metrics
Generated by Lummox's dmifontsplus (https://www.byond.com/developer/LummoxJR/DmiFontsPlus)
Note: these variable names have been changed, so you can't straight copy/paste from dmifontsplus.exe
list of font size/spacing metrics</p><h3 id="var/name"><aside class="declaration">var </aside>name <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L4"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 4"></a></h3><p>Font name, just so people know what to put in their span style.</p><h3 id="var/overhang"><aside class="declaration">var </aside>overhang <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L25"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 25"></a></h3><p>extra width, such as from italics, for a line</p><h3 id="var/start"><aside class="declaration">var </aside>start <aside> </aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L33"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 33"></a></h3><p>first character in metrics</p><h2 id="proc">Proc Details</h2><h3 id="proc/get_metrics"><aside class="declaration">proc </aside>get_metrics<aside>(text, flags, first_line) <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/interface/fonts/fonts_datum.dm#L39"><img src="git.png" width="16" height="16" title="interface/fonts/fonts_datum.dm 39"></a></aside></h3><p>Get font metrics
From Lummox's dmifontsplus (https://www.byond.com/developer/LummoxJR/DmiFontsPlus)</p></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html>