Declined
Last Updated: 05 Aug 2016 15:23 by ADMIN
Svetlin
Created on: 29 Apr 2013 03:26
Category: UI Framework
Type: Bug Report
2
FIX. TPF - html-like formatting concats some words if span tag with style attribute is used.
If you are using span tag in cooperation with style attribute, the following html concat "Training Room B" string:

<html><p><i><span style="font-family: Microsoft Sans Serif;font-size: 13.3px;color: #C57300;">Welcome to RoBase</span></i><i><span style="font-family: Microsoft Sans Serif;font-size: 10.7px;color: #C57300;">,</span></i><span style="font-family: Microsoft Sans Serif;font-size: 11px;color: #000000;"> Please be aware that </span><span style="font-family: Microsoft Sans Serif;font-size: 11px;color: #C50000;">Training Room A</span><span style="font-family: Microsoft Sans Serif;font-size: 11px;color: #000000;"> will be off limits for the rest of the week for a much needed paint job. </span><b><span style="font-family: Microsoft Sans Serif;font-size: 11px;color: #008116;">Training Room B</span></b><span style="font-family: Microsoft Sans Serif;font-size: 11px;color: #000000;"> is still available and the Conference Room can be used if needed.</span><span style="font-family: Calibri;font-size: 16px;color: #000000;"><br /></span></p><p><span style="font-family: Microsoft Sans Serif;font-size: 11px;color: #000000;">See Linda to reserve it. Thanks.</span></p></html>
1 comment
ADMIN
Ralitsa
Posted on: 05 Aug 2016 15:23
By default, we use the GDI+ to measure the text. The observed issue is caused by the Graphics.MeasureString method which does not measure correctly the Microsoft Sans Serif bold space. More information about differences when rendering with GDI+ can be found on Microsoft`s page: Why text appears different when drawn with GDIPlus versus GDI (https://support.microsoft.com/en-us/kb/307208 ) 

For HTML-like text rendering, the possible solution is to set the TextWrap property to false, or use a suitable font like Arial.