`pagFile.replaceText` with `fillColor` not working, text always black
Open
@domchen is already working on this.
Since Mar 5, 2025.
- Dominant language
- HTML
- Stars
- 5.8k
- Forks
- 531
- Avg merge
- 8d 55m
- Merged PRs (30d)
- 17
Description
你好!非常感谢你们的很好的库。我上次提 #2702, 谢谢你们的答复啊。这次更新4.4.x后遇到了一些新的问题 如下:
Which Version of libpag are you using?
libpag 4.4.25
What Platform are you on?
Web
Expected Behavior
Calling replaceText on a loaded pagfile after setting fillColor on a textData should properly set the color of the text data.
Like this:
Actual Behavior
The rendered text is always black, ignoring the fillColor set on the `textData.
Code Example
Bug repro can be found in this repo:
https://github.com/johncalvinroberts/libpag-text-test
Specifically:
const textData = pagFile.getTextData(i);
textData.fillColor = { red: 255, green: 255, blue: 0 };
textData.text = "REPLACE";
pagFile.replaceText(i, textData);
Upload the pag file below to show the bug -- text is always black.
PAG File
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.