rdkcentral / Lightning-SDK

SDK for Lightning framework
Apache License 2.0
130 stars 69 forks source link

Pixeled fonts in Metrological build #334

Closed mikita-liaukovich-epam closed 2 years ago

mikita-liaukovich-epam commented 2 years ago

Hi guys,

I've encountered issue with some fonts in Metrological build (only): some fonts are rendering pixeled, but some are smooth. E.g.: image

Both labels share the same properties as they are the same components and rendering in the Array.prototype.map

Here is the template

static _template() {
    return {
      flex: {
        direction: "row",
        alignItems: "center",
      },
      Title: {
        flexItem: {
          marginLeft: MARGIN_LEFT,
        },
        text: {
          fontSize: 30,
          fontStyle: "bold",
          fontFace: fonts.VMCircularYell_Black,
          wordWrapWidth: SIZE.w - (MARGIN_LEFT * 2),
          lineHeight: 35,
        },
      },
    };
  }

Just an observation: in that exact case pixeled label is wrapped (wordWrap), the smooth one isn't

But the same issue appears in other places, like this one:

Don't mention the color, there's no dependency on color property

image image

SDK: 4.8.1 CLI: 2.7.2 Build: Metrological only Seen on: Arris EOS, Humax EOS Browser: WPE

wouterlucas commented 2 years ago

Hi @mikita-liaukovich-epam does this happen on a dist build as well or just in the metrological environment?

If it happens on a dist build too, can you share a snippit or sample app that reproduces the issue so we can have a look?

wouterlucas commented 2 years ago

Circling back to this, it seems the instance hosted by Metrological runs Lightning version 2.5.1 which requires textRenderSharpFontSize and textRenderSharpPrecision to be set in the configuration for font precision settings.

Alternatively they can upgrade to a later version of Lightning, as of version 2.6.0 the settings have been renamed to fontSharp and fontSize as per https://lightningjs.io/docs/#/lightning-core-reference/RuntimeConfig/index?id=stage-configuration-options

Same information has been provided back to Metrological.