Copy link to clipboard
Copied
Hello everyone
I encountered a problem like this. When I write the two conditions of font + font size in FindChangeByList, only the font attribute works, but not the font size. I don’t know why? code show as below:
grep {findWhat:"勻",appliedFont:"方正书宋_GBK",fontSize:"10.5"} {changeTo:"匀"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
Not fontSize: "10.5" will also be replaced here.
It's pointSize, not fontSize
Copy link to clipboard
Copied
I am not sure if I understood this right. So you mean that it is not finding the correct result? What do you mean by fontSize: "10.5" will also be replaced here?
-Manan
Copy link to clipboard
Copied
Hello, I mean, the characters that satisfy both (appliedFont:"方正书宋_GBK",fontSize:"10.5") are replaced.
When I write code, characters that are not (fontSize:"10.5") will also be replaced.
Copy link to clipboard
Copied
Regardless of whether it is a size of 10.5 or not, it will be replaced.
But according to the code I wrote, it should only be replaced if it meets the font and size requirements. I don't know why fontSize doesn't work here
Copy link to clipboard
Copied
Does it work with whole numbers?
Are there any character or paragraph styles applied (even nested styles) overriding the size?
Is the font name absolutely correct?
I've never done this before but could you apply a character style with the font size to the text?
grep {findWhat:"勻", appliedFont:"方正书宋_GBK"} {changeTo:"匀", appliedCharacterStyle:"YourCharacterStyleName"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
Copy link to clipboard
Copied
Copy link to clipboard
Copied
It's pointSize, not fontSize
Copy link to clipboard
Copied
Thanks, pointSize is right.