Uploaded image for project: 'Qt for MCUs'
  1. Qt for MCUs
  2. QTMCU-202

Getting fontcompiler warning when not using default pixel size in the application

    XMLWordPrintable

Details

    Description

      One gets fontcompiler warning if the following conditions below are met:
      1. CMake macro QUL_DEFAULT_FONT_FAMILY is set to some font
      2. QUL_AUTO_GENERATE_GLYPHS is set to OFF (MCU.Config.autoGenerateGlyphs = false)
      3. The property font implementing the default font family has pixelSize other than default (20).

      An example of a warning:
      [fontcompiler] warning: No glyphs were generated for font: [default font] Sarabun (size: 20, weight: 400, quality: 8). Make sure unicodeCoverage property was correctly set. See: https://doc.qt.io/QtForMCUs/qtul-fonts.html#embedding-glyphs

      To avoid this warning one has to change pixelSize to 20 or alternatively make a "dummy" font property with default pixelSize. This should not be required.

      Static font engine seems to always include glyphs for the default size, even if the application does not use it which is very wasteful. This can happen in the aforementioned case where the application does not use the default size, but explicitly sets font.pixelSize elsewhere.

      If we would allow to set the default size via macro, the issue would go away.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            foxxx Tuukka Kettunen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes