Skip to content

mmillar-bolis/MDunmeris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[MD]unmeris

A Git Markdown Repository for Morrowind Related Documents


View on GitHub.io

Markdown is a plain-text language that makes writing formatted documents very easy. It's also possible to call custom fonts in Markdown using in-line HTML. By incorporating one of the available online dialects, it's very easy to quickly produce shareable documents in Dunmeris, the language of the people of Morrowind.

Note: GitHub's ReadMe view will not load custom fonts. Please use github.io for more about Dunmeris and the Daedric script.

Ghartok Trigon
Ghartok Trigon

Quick Info:

Want to jump right in to creating and translating your own manuscripts? Here's all you need:


Further Background

If you are unfamiliar with John Gruber and Aaron Swartz's Markdown language, have a look at it.

Markdown is a text formatting language that translates to strict HTML. The central focus and reason for the language is to store source text in the most human readable fashion possible but still be able to render it with formatted HTML.

Aside from the Reference Specification, there are other slightly different dialects as well such as, GitHub Flavored Markdown and Pandoc Markdown.

However, all you really need to get started is something like Adam Pritchard's Markdown Cheatsheet.


Fonts in Markdown

Knowing that Markdown files are translated into HTML, one can actually embed HTML directly into a document for edge-case needs. To do so goes a bit against the ethos behind the language, but it does reasonably introduces a way to rapid prototype tricky designs when Pandoc is not available or you don't have template files to surround your markdown yet.

Adding a style tag to the beginning of your document will allow for adding some CSS to import a font. Below is an example of an HTML style tag with embedded CSS that declares a font:

<style>
@font-face {
    font-family: HayghinDaedric;
    src: url("/path/to/HayghinDaedric.ttf") format('truetype');
    font-weight: medium;
    font-style: normal;
}
</style>

Optionally, if your markdown viewer does not allow for loading external fonts, you can convert the font to embeddable text using Base64 and then insert that into your tag. Below I have changed the source to load text data from the URL path where <BASE64_TEXT_CONTENTS> is the ASCII conversion of a TrueType font:

<style>
@font-face {
    font-family: HayghinDaedric;
    src: url(data:font/truetype;charset=utf-8;base64,<BASE64_TEXT_CONTENTS>) format('truetype');
    font-weight: medium;
    font-style: normal;
}
</style>

This will allow you to distribute a single, flat markdown file with fonts, similar to a .pdf. However, it is important to know that embedding fonts produces large text files, and these can be difficult to work with if not maintained. (For this project, I am only importing loose fonts.) In some rare cases, antiviral programs might regard embedded Base64 as suspicious.

Finally, you can render text in your Markdown body by wrapping it with a span tag that specifies the font by it's internal name (not filename):

<span style="font-family:HayghinDaedric">makhel fahraj</span>

All one really needs to get started is this handy GitHub template! The documents within already contain this style element, one with the font embedded and the other with a reference to the loose .ttf font. They are ready for editing or viewing from a local markdown renderer, provided the font folder is kept with loose one.