tranleduy2000 / pascalnide

Pascal Compiler for Android
92 stars 25 forks source link

[Graph unit] Different font face for each text style #12

Closed pakLebah closed 7 years ago

pakLebah commented 7 years ago

In Graph unit, setTextStyle() function provide at least 7 kinds of font face. But, as I play around with Graph unit, it seems that only available 2 font faces provided by Pascal N-IDE. One for sansSerifFont and one for the others. So, could you please give each of them different font face?

Here's my suggestion:

Or simply pick any suitable fonts provided by Google.

Reference:

tranleduy2000 commented 7 years ago

All fonts must be fixed width. Thank you for your suggest.

pakLebah commented 7 years ago

Why all the fonts must be fixed width? It's for graph unit, not for the editor nor the console. We should be able to use any kind of fonts on graph mode, right?

tranleduy2000 commented 7 years ago

We can use any font. But when drawing I need to calculate the exact size of the characters. The fixed width font is a great choice for performance. But if you want, I can adding the fonts, it looks great.

tranleduy2000 commented 7 years ago

Added in the commit 973af72302bc8b130b1885c13e8b2dd55fb6edce

pakLebah commented 7 years ago

You may keep the performance on fixed-width fonts. But provide other fonts as option so we could pick that if we really need to.