ScriptExport.h header
#include <ew/app/ScriptExport.h>
Namespace ew::app
ImportedScript struct
struct ew::app::ImportedScript
A whole script read back from a JSON document.
Members
ew::core::conlang::WritingSystem ew::app::script::ImportedScript::writing
The writing system it describes.
std::vector<ew::core::conlang::GlyphArticulation> ew::app::script::ImportedScript::articulations
The articulations that derived its generated glyphs.
bool ew::app::script::ImportedScript::ok = false
Whether the document could be read at all.
QString ew::app::script::ImportedScript::error
Why it could not, when ok is false.
bool ew::app::script::ImportedScript::operator==(const ImportedScript &other) const =default
Value equality over all fields.
Functions
ImportedScript ew::app::script::scriptFromJsonDocument(const QString &document)
The script document describes, or a failure saying why not.
QString ew::app::script::scriptToJsonDocument(const ew::core::conlang::WritingSystem &writing, const std::vector< ew::core::conlang::GlyphArticulation > &articulations)
writing and articulations as a JSON document, for export.
The same serializer the project store uses, so what is exported is exactly what is saved and the round-trip cannot drift. Carries the generator's inputs alongside the glyphs, because a script exported without them cannot be adjusted after it is imported – only redrawn.
QString ew::app::script::specimenSvg(const ew::core::conlang::WritingSystem &writing, const LayoutOptions &options, int columns)
writing's whole inventory as one SVG specimen sheet.
QString ew::app::script::textSvg(const ew::core::conlang::WritingSystem &writing, const QString &text, const LayoutOptions &options)
text set in writing, as one SVG document.
Every glyph is inked with the pen the LAYOUT decided for it, so a connected script tapers only at the ends of each word and an anchored one does not let tremor move the joins.