Fix oblique type bug for Chinese#1147
Fix oblique type bug for Chinese#1147shengyang998 wants to merge 1 commit intowordpress-mobile:developfrom
Conversation
The bug is: When you type Chinese and English at the same line with `oblique` format enable, and then when you delete all the English characters, the `oblique` format button won't be able to toggle again.
|
@shengyang998 thank you for the report and the PR! Do you mind adding a unit test to validate or just shows us some text where the problem occurs? |
Here is my test case:
The problem is caused by Moreover, the problem is not only for Chinese character, any character that don't have a There should be an improvement in my code, but I am not a linguist and don't have too much time to deal with all kind of languages. Yes, it would be better if there is a method to test whether a font has a italic trait or not, but I did not find it. If you find a better solution, let me know. Thanks. ❤️ |
|
We recently switched the project license. Aztec is now under the MPL v2.0. More info on this ticket: #1305 If this PR gets merged, the code will be under the MPL v2.0. |
The bug is: When you type Chinese (or other language that has not
italictype) and English at the same line withitalicformat enable, and then when you delete all the English characters, theitalicformat button won't be able to hit again.To test:
Just type Chinese and English with
italicopen and delete all the English characters.After doing so, try to hit the
italicformat button again and you will see the different.