Skip to content

Mixin and Control Font #1346

Closed
Closed

Description

@itg-assistant

Ewan Walker asked 2018-02-01 12:05:08 UTC

I have applied a Mixin to override the theme font for all four categories default , default bold, menu, window-title.

When I run the app the Mixin gets applied and the correct fonts are used except for the report viewer control toolbars.

However if I add a line object t = Control.font and inspect its value it is Microsoft Sans Serif. (last in the list in the Theme)

So does the Control.Font command bypass the Mixin font exchange?

Thanks

Ewan

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2018-02-02 21:38:41 UTC

    The Font property of a Wisej control is either the value assigned to the control or the inherited font from a parent, or ultimately the font from the theme. However, the System.Drawing.Font object has no knowledge of web fonts, that's why Wisej creates the theme fonts using the theme name prefixed by "@". The serializer recognizes the theme font using the OriginalFontName property of the font object. The client will resolve the name to a valid web font. When you use the font on the server side you will see the fallback font used by the windows server and the theme name in OriginalFontName.

    The report virewer is an ASP.NET control running in an iframe. To change its font you need to set the name and size in OnInit or OnLoad:

    viewer.Font.Name = "Verdana";
    viewer.Font.Size = 30;

    HTH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions