This page list the most common styling properties supported by MyScript iink SDK.

If what you would to style is not listed here, please feel free to ask on our on our developer forum.

Style of the strokes

You can set the style associated with a pointer tool: Supported properties are color, -myscript-pen-brush and -myscript-pen-width.

Style of the fonts with a theme

MyScript iink SDK makes it easy to style content with a theme using CSS properties listed in this page.

In addition to these css styling properties, you can adjust its default configuration with different options presented here.

Restrictions from CSS

The following restrictions apply:

Available classes and properties

glyph type

MyScript iink SDK exposes the glyph type that allows you to specify fonts properties for all converted text glyphs:

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.

In addition, the following classes and properties are available that are specific to each content type:

Diagram block

.diagram is the default class for items in a “Diagram” content block:

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.

Math block

.math is the default class for items in a “Math” content block:

Property Default value Remarks
font-family STIX Two Math  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.
color #000000FF See possible values.

.math-variable defines the style applied to the variables after ink conversion:

Property Default value Remarks
font-family STIX Two Text  
font-style italic  
font-variant normal  
font-weight 300 Only numerical values are supported.
color #000000FF See possible values.

.math-solved defines the style applied to the glyphs that are generated by the solver:

Property Default value Remarks
font-family STIX Two Math  
font-style normal  
font-weight 300 Only numerical values are supported.
color #A8A8A8FF See possible values.

Text block

.text is the default class for items in a “Text” content block:

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.
font-size None In millimeters (model unit).
line-height None Multiplier of the font size.

Note that iink computes the default line height and font size based on the device resolution instead of using a static css containing default values. You can modify font-size and line-height values to adjust the guides spacing, but note that “Text” and “Text Document” guides spacings are not identical.

In both cases, to avoid visual artifacts, you should change the editor theme before opening the part.

For instance, the following CSS will correspond to a 13-millimeter spacing when the theme is set to a “Text” part. For a “Text Document” part, the example is still valid but the outcome might be slightly different.

.text {
  font-size: 10;
  line-height: 1.3;
}

Raw Content block

.raw-content is the default class for items in a “Raw Content” block:

Property Default value Remarks
font-family “sans-serif”  
font-style normal  
font-variant normal  
font-weight 300 Only numerical values are supported.

.raw-content-grid is the default class of the “Raw Content” block background grid, when the raw-content.line-pattern is grid:

Property Default value Remarks
color #00000011 See possible values.

Possible values

Colors

Colors can be specified as rgb(), rgba(), hsl(), hsla(), #rgb, #rgba, #rrggbb, #rrggbbaa.

Named colors (black, red, etc.) are not supported.

-myscript-pen-brush