Skip to content

Icon Fonts #496

@uwerat

Description

@uwerat

Material3/Fluent2 come with a huge collection of icons. Open source projects offering icon sets are available as well.

These icons are not only available as SVGs but also as Icon Fonts using the PUA ( https://en.wikipedia.org/wiki/Private_Use_Areas ) of the Unicode range.

We can make use of these fonts this way:

QskGraphic icon( const QString& fontFamily, QChar symbol )
{
QFont font( fontFamily );

QskGraphic graphic;

QPainter painter( &graphic );
painter.setFont( font );
painter.setPen( Qt::black );
painter.drawText( 0, 0, symbol );

return graphic;

}

The keycodes in the various fonts are probably not aligned according to the type of operation ( search, dismiss, open ... ) and we might need to introduce some sort of IconRole that can be mapped by the skins to the keycode of the specific icon font.

Then all SVGs being loaded in the skins and examples can be replaced by this concept.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions