NathanaelA / nativescript-platform-css

A NativeScript plugin to deal with Declarative UI and Platform specific CSS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

incorrect calculation of space when using (true type) fonts

abhayastudios opened this issue · comments

Hi Nathan!

I am enjoying this plugin very much for defining responsive like pages. However, now I've run into an issue whilst using the OpenSans true-type font, where it seems that the space calculation does not work properly and sentences are "cut off" on iOS (haven't tried Android yet)

I've created an example project which should demonstrate the issue.

The idea of test-css.ts is to show the text stacked on a cell phone, and on a tablet show them in two columns. I've added the same texts twice (each in a WrapLayout), once with the default font and once with OpenSans.

On the iOS simulator's iPhone 7 (using regular css) all texts display correctly. However, on the iOS simulator's iPad Pro, which is where the CSS rules that use your plugin kick in, both OpenSans paragraphs have the last line cut off.

Any idea what might be wrong here?

Hmmm now I noticed that it happens also while using the default font if the iPad is in portrait orientation (although to a lesser degree than with the TTF).

Sorry Nathan, after having another look it seems this is not related to this plugin, but to buggy/unexpected behavior around CSS padding.