Migration guide
This page lists the key points to pay attention to when migrating existing code from MyScript iink SDK 2.3 to the new MyScript iink SDK 3.0.
Shape enhancements
This enhancement allows for easier manipulation of shapes in "Raw Content": By optimizing shape design and connections, shapes are now easier to manipulate and control. By default, this feature is not activated to keep previous behavior. So, to take advantage of this enhancement in "Raw Content" you should tune your configuration :
// Shape enhancement configuration for Raw Content
// Allow auto connection of shapes and connectors
setBoolean("raw-content.auto-connection", true)
// Define shape enhancement policy
setStringArray("raw-content.edge.policy", arrayOf("default-with-drag"))
// Configure shapes axis snapping
setStringArray("raw-content.shape.snap-axis", arrayOf("triangle", "rectangle", "rhombus", "parallelogram", "ellipse"))
You can also refer to our Demo examples that we've configured as above.
Selection API changes
We have refactored some APIs related to selections. As a result, we have deprecated the ContentSelection getBox and getConversionState methods.
So you will need to make the following code changes:
- if you have been using the
ContentSelectiongetBox()method, replace it byEditorgetBoxmethod with the selection as parameter. - if you have been using the
ContentSelectiongetConversionState()method, replace it byEditorgetConversionStatemethod with the selection as parameter.
Math fonts changes
We have updated our fonts for Math content:
.math and .math-solved
| Property | New default value | Previous default value |
|---|---|---|
font-family | STIX Two Math | STIXGeneral |
.math-variable
| Property | New default value | Previous default value |
|---|---|---|
font-family | STIX Two Text | STIX |
font-style | italic | italic |
As a result of this font change, the square root bar is now calculated slightly differently. Depending on the font, it may appear thicker.
- If you have been using the STIX font, our recommendation is to upgrade to the STIX Two font. To do this, you can take a look at our Demo examples, which we've modified to make use of the new fonts.
- If you have been using another font, for a better rendering, you may need to adjust the thickness of the square root bar using the
renderer.sqrt.bar-scaleproperty.
Recognizer and RecognitionAssetsBuilder exception changes
Some of the exceptions have been modified to provide better error handling, so if you were using the following methods, you may need to make some adjustments to your code:
- On Android,
RecognitionAssetsBuilder.compile,Engine.createRecognizer, andRecognizer.clearhave been reworked. - On other plaftorms,
Recognizerclearmethod has been reworked.