iink SDK on Device

Answered

About converting Text blocks

We are trying to understand how the iink SDK handles the conversion of text blocks.

From what we understood, if we convert using ConversionState.DIGITAL_PUBLISH, the SDK will try to move the text blocks that are not yet converted as high as possible on the page without moving them above other blocks that are already converted. The text will also be resized to match the font size specified in the editor configuration.

If we use ConversionState.DIGITAL_EDIT, the vertical position of the block will not change.

In both cases, a number of white spaces can be added to the left of the converted handwritten text. The number of white spaces is proportional to the horizontal position of the first handwritten letter, relative to the left border of the text block before conversion, and creates a margin to the left of the converted text.

Is the above correct?

Also, is the size of the text converted with ConversionState.DIGITAL_EDIT controlled by the size of the line spacing?


Best Answer

Hello Nicolas,


Thank you for contacting us.


Yes your understanding is correct:


  • DIGITAL_PUBLISH corresponds to the typeset content, adapted for publication : therefore, it has a small font size, and it corresponds  to fitted graphics in the case of a Text Document
  • DIGITAL_EDIT corresponds to the typeset content suitable for edition : so the font size is large enough for editing, and it corresponds to expanded graphics.


With iink 1.4, in both cases, the size of the converted (typeset) text depends whether you have set a font-size or whether your are using the default style sheet:

Since 1.4, 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 override this default styling, by setting a theme on your editor : values  defined by your provided style sheet will have a higher priority.

For further details please refer to https://developer.myscript.com/docs/interactive-ink/1.4/android/fundamentals/styling/ and https://developer.myscript.com/docs/interactive-ink/1.4/reference/styling/


For both DIGITAL_PUBLISH and DIGITAL_EDIT the font-size that you set with the theme is taken into account, and as explained above for DIGITAL_EDIT the font-size will be larger than for DIGITAL_PUBLISH.



Regards,


Gwenaëlle

1 Comment

Answer

Hello Nicolas,


Thank you for contacting us.


Yes your understanding is correct:


  • DIGITAL_PUBLISH corresponds to the typeset content, adapted for publication : therefore, it has a small font size, and it corresponds  to fitted graphics in the case of a Text Document
  • DIGITAL_EDIT corresponds to the typeset content suitable for edition : so the font size is large enough for editing, and it corresponds to expanded graphics.


With iink 1.4, in both cases, the size of the converted (typeset) text depends whether you have set a font-size or whether your are using the default style sheet:

Since 1.4, 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 override this default styling, by setting a theme on your editor : values  defined by your provided style sheet will have a higher priority.

For further details please refer to https://developer.myscript.com/docs/interactive-ink/1.4/android/fundamentals/styling/ and https://developer.myscript.com/docs/interactive-ink/1.4/reference/styling/


For both DIGITAL_PUBLISH and DIGITAL_EDIT the font-size that you set with the theme is taken into account, and as explained above for DIGITAL_EDIT the font-size will be larger than for DIGITAL_PUBLISH.



Regards,


Gwenaëlle