--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
SkPaint has a measureText() method which returns the width of a text run.Brian
On Thu, Sep 8, 2016 at 8:30 AM Igor Khromov <khromo...@gmail.com> wrote:
Hi guys!--I want to create custom textField and I need to draw separate char or text on canvas. How to define canvas size before it's creation? For example I need to draw symbol "X" with some typeFace created from .ttf file, how I can calculate bitmap size before create canvas?And do you know any textField implementations based on Skia? And if (know==YES), where I can find them)?Thanks a lot in advance :-) !!!
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
SkPaint has a measureText() method which returns the width of a text run.Brian
On Thu, Sep 8, 2016 at 8:30 AM Igor Khromov <khromo...@gmail.com> wrote:
Hi guys!--I want to create custom textField and I need to draw separate char or text on canvas. How to define canvas size before it's creation? For example I need to draw symbol "X" with some typeFace created from .ttf file, how I can calculate bitmap size before create canvas?And do you know any textField implementations based on Skia? And if (know==YES), where I can find them)?Thanks a lot in advance :-) !!!
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss+unsubscribe@googlegroups.com.
for example: https://fiddle.skia.org/c/@measure_text_bounds
On Thu, Sep 8, 2016 at 8:58 AM, 'Brian Salomon' via skia-discuss <skia-d...@googlegroups.com> wrote:
SkPaint has a measureText() method which returns the width of a text run.Brian
On Thu, Sep 8, 2016 at 8:30 AM Igor Khromov <khromo...@gmail.com> wrote:
Hi guys!--I want to create custom textField and I need to draw separate char or text on canvas. How to define canvas size before it's creation? For example I need to draw symbol "X" with some typeFace created from .ttf file, how I can calculate bitmap size before create canvas?And do you know any textField implementations based on Skia? And if (know==YES), where I can find them)?Thanks a lot in advance :-) !!!
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To post to this group, send email to skia-d...@googlegroups.com.
Visit this group at https://groups.google.com/group/skia-discuss.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
Thanks, I think I got it.All the bounds connected to baseline, so to get symbol drawn without clipping, I should create canvas with size: height = (fAscent + fDescent ), width = textBounds.width().