Repository navigation
pag text layer editing #1626
Replies: 1 comment 1 reply
|
I have already solved this problem. but Why does replacing fontstyle not take effect,for example: |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Does text layer editing support adding attributes such as underscores、word spacing、line spacing、alignment and transparency ?If supported, how should I implement it? Is there an example?
I know that it support fontFamily or fontSize or fontStyle, for example:
auto pagFile = pag::PAGFile::Load("./assets/audio.pag");
for (int i = 0; i < pagFile->numTexts(); i++) {
auto textDocumentHandle = pagFile->getTextData(i);
auto pagFont = pag::PAGFont::RegisterFont("./font/NotoSansSC-Regular.otf", 0);
textDocumentHandle->fontFamily = pagFont.fontFamily;
textDocumentHandle->fontStyle = pagFont.fontStyle;
textDocumentHandle->fontStyle = "bold";//is that right?
textDocumentHandle->fontSize = 24;//is that right?
pagFile->replaceText(i, textDocumentHandle);
}
All reactions