OrthographyRender.h header

#include <ew/app/OrthographyRender.h>

Namespace ew::app

Functions

QString ew::app::conlang::romanizeWord(const QString &word, const ew::core::conlang::PhonemeInventory &inventory, const ew::core::conlang::RomanizationScheme &scheme)

Renders a word (written in the inventory's default graphemes) using the romanization scheme, by longest-match transliteration: each phoneme's default grapheme is replaced by the grapheme the scheme spells that phoneme with, falling back to the default grapheme for any phoneme the scheme does not remap. Characters matching no phoneme are kept as-is. Matching ignores case, and because a romanization is a spelling the result keeps the capital word was written with.

QString ew::app::conlang::wordToIpa(const QString &word, const ew::core::conlang::PhonemeInventory &inventory)

Renders a word – written in the inventory's default graphemes, as the word generator produces it and as a coined headword is spelled – into IPA, by longest-match transliteration against inventory (each phoneme's grapheme is replaced by its IPA symbol). A run of characters that matches no phoneme grapheme is kept as-is, so literals in a syllable template survive. Longest graphemes are matched first, so a multi-character grapheme like "sh" is not mis-split into "s" + "h". Matching ignores case and the result is IPA, which carries no capital.