We use Roboto font as our primary font throughout the application. We’ve installed the font on the server, on our client and we still have a problem.
We have a DataGridView with a text column, with AllowHTML set to True, however we can’t set a portion of the text in that column to bold unless we change the font to something like Arial or Tahoma. We’ve tried ‘b’ and ‘strong’ tags, plus ‘font-weight’ and none of them work with Roboto.
This is our source code:
if (isEven)
mFN.SetCellValue(gRow[“Testing”], “<b>This is a </b>Roboto”);
else
mFN.SetCellValue(gRow[“Testing”], “<span style=’font-family:Arial’><strong>This is a </strong>Arial</span>”);
SetCellValue() is just a method that sets the value of the Cell to the text. I’ve attached a screen shot of the result.
Is there a way of doing this with Roboto?
Works fine in our browser and with your demo app, but not with ours. I think it may be a clash with the theme we have.
If Roboto is installed on the server, do we need to specify it as a source using the data:font or can we just use Roboto? I’ve attached a screen shot.
Since you’re using html, it likely has nothing to do with Wisej. Try to set the font to bold Roboto with a simple html page and see if you get the same result.
If it’s also not working with a html page, you can download Roboto here: https://fonts.google.com/selection?query=roboto Make sure to unzip the file and right-click “install”, especially on “Roboto-Bold.ttf”
Font installation instructions: https://support.microsoft.com/en-us/office/add-a-font-b7c5f17c-4426-4b53-967f-455339c564c1
After installing Roboto on my machine, it works for me, in both a simple HTML page and in a Wisej project.
I’ve included a zip file with the test html page and the test Wisej project.
Please login first to submit.