Updating an application from titanium sdk 3.4.0.GA to 9.2.0.GA making my fonts looks very very small

86 views Asked by At

Default uint is set to dp.

<property name="ti.ui.defaultunit" type="string">dp</property>

All the font size is set with dp unit in tss files. Like below

 font: {
        fontSize: '16dp'    
    }

I manually updating all style files front size from '10dp' to '17sp' (like that) increased my font little bit but all the popup and other font is still very very small to see.

<supports-screens android:anyDensity="false"/>

I have tried toggling it but didn't work.

I am getting a warning like below , I dont know if it has something to do with my issue. I don't know how to fix the warning.

[WARN]  2DMatrix: (main) [483,59911] Ti.UI.2DMatrix DEPRECATED in 8.0.0, in favor of Ti.UI.Matrix2D
1

There are 1 answers

4
miga On
  • remove the anyDensity part. It is true by default and should be like this
  • you don't need dp or sp when you set a fontSize. Just set it to 16 (integer) without any ending
  • search for create2DMatrix and change it to createMatrix2D. But that is just a deprecation warning (still update it now) but shouldn't be responsible for the fonts

If some fonts are still small it would be interesting to know where they are (e.g. you've said popup. A system popup?) or if you apply any other things like scaling or animations to them. Do you use a global theme? Just labels or Textfields?

Try setting a default value for all labels etc in app.tss

"Label" : {
    color: "#000",
    font: {
        fontSize: 16
    }
}

"TextField" : {
    color: "#000",
    font: {
        fontSize: 16
    }
}

And check the app on iOS.