This page list the most common styling properties supported by MyScript iink SDK.
You can set the style associated with a pointer tool:
Supported properties are color
, -myscript-pen-brush
and -myscript-pen-width
.
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.
The following restrictions apply:
h1
, p
or div
are not supported).mm
and properties provided with an explicit unit will be ignored.inherit
, initial
or unset
are not supported.*
) and combinators are not supported.glyph
typeMyScript 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
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
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
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.
For “Text” parts, the spacing of handwriting guides (if enabled) is given by font-size
* line-height
.
For “Text Document” parts, the guides spacing considers the font-size
and line-height
product too. But some more computation adjusts the line gap.
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
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. |
Colors can be specified as rgb()
, rgba()
, hsl()
, hsla()
, #rgb
, #rgba
, #rrggbb
, #rrggbbaa
.
Named colors (black
, red
, etc.) are not supported.
-myscript-pen-brush
Polyline
, FountainPen
, CalligraphicQuill
, CalligraphicBrush
, Qalam
and FeltPen
.Extra-
, such as Extra-Pencil
in the Android demo example.FeltPen
.