The OpenD Programming Language

StyleOptions

Style options for various tags. Helpful reference: https://www.w3.org/TR/CSS22/sample.html Note: there is no <b> and <i> style, as commonmark-d doesn't generate them.

struct StyleOptions {
TagStyle p;
TagStyle b;
TagStyle strong;
TagStyle i;
TagStyle em;
TagStyle h1;
TagStyle h2;
TagStyle h3;
TagStyle h4;
TagStyle h5;
TagStyle h6;
TagStyle pre;
TagStyle code;
TagStyle ol;
TagStyle ul;
TagStyle li;
TagStyle img;
}

Members

Variables

color
string color;

Default text color.

fontFace
string fontFace;

Default font face.

fontSizePt
float fontSizePt;

Default font size, in points.

fontStyle
FontStyle fontStyle;

Default font italic-ness

fontWeight
FontWeight fontWeight;

Default font weight.

onEnterPage
void delegate(IRenderingContext2D context, int pageCount) onEnterPage;

An empty callback you can override to decorate each page of the document. You cannot call other FlowDocument function from inside this callback. pageCount is the page number, starting with 1. This is called before anything else is drawn on a page.

pageBottomMarginMm
float pageBottomMarginMm;

Bottom margin, in millimeters.

pageLeftMarginMm
float pageLeftMarginMm;

Left margin, in millimeters.

pageRightMarginMm
float pageRightMarginMm;

Right margin, in millimeters.

pageTopMarginMm
float pageTopMarginMm;

Top margin, in millimeters.

paragraphTextIndentMm
float paragraphTextIndentMm;

<p> first line text indentation, in millimeters.

textAlign
TextAlign textAlign;

Default text alignment (only TextAlign.start and TextAlign.left are supported!)

Meta