suragch / mongol-library

A library to allow vertical script Mongolian in Android apps
MIT License
58 stars 17 forks source link

how to make digits orientation to vertical ? #3

Open 1903514970 opened 5 years ago

1903514970 commented 5 years ago

I‘v changed digits “isRotated = true" in MongolTextLine.java,the numbers became vertical but not perform
well. How to make digit's orientation to vertical and performs well ?

suragch commented 5 years ago

What do you mean by "not perform well"? Is it slow? Does it make other characters rotate wrong? What is the specific problem?

Did you add an if statement to check for digits in the isRotated(int codePoint) method?

I've also thought about rotating digits in the past, but I didn't know what was standard. For example, single digit like 1 or 8 would be good if they were rotated. But what about 2 digit numbers like 10 or 43? Or longer numbers like phone numbers or years? What is the general expected behavior?

1903514970 commented 5 years ago

thanks for your reply. Yeah,I have add an if statement, and I only want one digit number to vertical。here is the gif. there is a problem that some of numbers are not visible,they just go down but I want them change line. 1551922062284

suragch commented 5 years ago

Thank you. That is clear. Somehow the view size is not getting measured correctly. I'll look into when I have some time. If you find the problem first, let me know.

I'm guessing that it would be a relatively simple fix to make all numbers rotated. If you only want to rotate single digits but not multi digits, that may be more difficult.

1903514970 commented 5 years ago

OK,thanks for your patient reply.