TsHTMLLabel and bold font used with Open Sans

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #70408
    bruno
    Participant

    Hi,
    When I use the <b> tag with the TsHTMLLabel component, the standard “Open Sans Bold” font is used. This is a standard behaviour but it doesn’t follow the Microsoft best practices that advise to use the Semibold font face instead (the bold font face doesn’t even appear in their list of cases) : https://docs.microsoft.com/en-us/windows/apps/design/signature-experiences/typography
    The bold font face is really much too bold to use in a normal context.
    In the attachment, the title “BM 402” uses the Semibold font face, and “Prélèvement” and “Contrôle” the Bold font face.

    Attachments:
    You must be logged in to view attached files.
    #70445
    bruno
    Participant

    My previous question was unnecessary as I discovered in the source of the component that there was a “FONT FACE” tag available.
    But there is a little annoying bug associated with its use. The text height is not calculated properly when I use the following code :
    '<FONT FACE="Segoe UI Bold">' + Text1 + ' </FONT>' + '<FONT FACE="Segoe UI">' + Text2 + '</FONT>'

    Attachments:
    You must be logged in to view attached files.
    #70447
    bruno
    Participant

    I continued my tests… and finally found the origin of the problem.
    It appears that the font names are located in Windows: if you want to use the bold version of Segoe UI, you’ll need to indicate “Segoe UI Gras” in French and “Segoe UI Bold” in English. That’s pretty annoying if you want your program to function the same way in different countries. But anyway I found the solution for my current need, as I wanted to use “Segoe UI Semibold”, which name seems to remain stable !

    #70456
    Support
    Keymaster

    Hi! It’s interesting, thank you for information.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.