help on skia 32bit on Centos for font selection

29 views
Skip to first unread message

aisnote com

unread,
Mar 22, 2023, 8:11:44 PM3/22/23
to skia-discuss
My App based on skia static lib.
ENV linux : centos7.9

but 64bit is worked.
Code are the same. Any idea?

Snipaste_2023-03-22_17-03-00.png

here is how font be set:

m_textStyle.setFontFamilies({m_fontName});

then prepare ParagraphBuilder:
ParagraphBuilder::make(m_pgStyle, m_fontCollection);
    builder->pushStyle(m_textStyle);
    builder->addText(m_pText, m_nTextBytes);
    m_pParagraph = builder->Build();
    m_pParagraph->layout(m_textBoxWidth);

Then paint:
m_pParagraph->paint(AsSkCanvas(pCanvas)

Thanks.


aisnote com

unread,
Mar 23, 2023, 7:35:16 PM3/23/23
to skia-d...@googlegroups.com
If I manually copy the font file to /usr/share/fonts, and the Skia internal fallback to the system's font, it will work.

Still not sure how to debug it?  Guess it may be related to fontconfig on 32bit.  Thanks.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/0d8e662c-c7f5-4793-aafd-7233a4589ff2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages