<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom visual development - issue rendering font &amp;quot;DIN&amp;quot; in Custom Visuals Development Discussion</title>
    <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/773796#M2450</link>
    <description>&lt;P&gt;Hi Evgenii Elkin,&lt;BR /&gt;Thank you for your response, time and help.&lt;BR /&gt;Sorry for delay in our response.&lt;/P&gt;&lt;P&gt;Couple of our visuals are live on app store. We have DIN as value for the font DIN.&lt;BR /&gt;We are trying to test suggession from Daniel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate if you can share your thoughts on following.&lt;BR /&gt;(Due apologies in case the questions are out of your boundary.)&lt;/P&gt;&lt;P&gt;1. It would be helpful to know name/value (Name &amp;amp; value specified in capabilities.json) for all fonts supported by PBI.&lt;BR /&gt;In case you have the list, can you please share it?&lt;BR /&gt;Also if the list notes non-public fonts, we will exclude from our custom visuals for time being.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Do you happen to know how font size be specified - px or pt, across PBI visuals?&lt;BR /&gt;I believe there was a bug noted on the font size and was being addressed.&lt;BR /&gt;Related reference link:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Issues/Font-size-not-consistent-across-visuals/idi-p/581490" target="_blank"&gt;https://community.powerbi.com/t5/Issues/Font-size-not-consistent-across-visuals/idi-p/581490&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your help and time.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 23 Aug 2019 03:24:35 GMT</pubDate>
    <dc:creator>inserv</dc:creator>
    <dc:date>2019-08-23T03:24:35Z</dc:date>
    <item>
      <title>Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/766692#M2420</link>
      <description>&lt;P&gt;Hi All.&lt;BR /&gt;We have an issue with rendering DIN font in our custom visual.&lt;/P&gt;&lt;P&gt;Issue: DIN font rendered by our custom visual do not match the same font&lt;BR /&gt;(with same color, size...) by built-in card visual.&lt;/P&gt;&lt;P&gt;Code:&lt;BR /&gt;private eleDinTest: d3.Selection&amp;lt;SVGElement&amp;gt;;&lt;BR /&gt;...&lt;BR /&gt;this.eleDinTest&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .text("Test DIN")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .style("font-size", 20 + "pt") // or .style("font-size", 20 + "px")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .style("font-family", "DIN")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .style("font-weight", "Normal")&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .style("fill", "#000000");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any additional style and/or attribute settings required?&lt;BR /&gt;Any help is much appreciated.&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 15:56:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/766692#M2420</guid>
      <dc:creator>inserv</dc:creator>
      <dc:date>2019-08-14T15:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/766910#M2423</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/162227"&gt;@inserv&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;From inspecting the card visual with the default properties set (DIN is the font in the dropdown), the following style attributes are set:&lt;/P&gt;&lt;PRE&gt;{
    text-anchor: middle;
    fill: rgb(51, 51, 51);
    font-family: wf_standard-font, helvetica, arial, sans-serif;
    font-size: 36px;
    font-weight: normal;
}&lt;/PRE&gt;&lt;P&gt;I'd suggest trying swapping out your appropriate &lt;FONT face="courier new,courier"&gt;.style&lt;/FONT&gt; function as follows:&lt;/P&gt;&lt;PRE&gt;.style("font-family", "wf_standard-font, helvetica, arial, sans-serif")&lt;/PRE&gt;&lt;P&gt;I've had trouble getting some fonts to render as per other visuals - Segoe (Bold) is one such example, but this one seems to work.&lt;/P&gt;&lt;P&gt;Here's a quickly-produced custom visual with your code (swapped out with the suggested change for &lt;FONT face="courier new,courier"&gt;font-family&lt;/FONT&gt;), compared to a card visual:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 606px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/185128i06FDB698D9F2253F/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hopefully this should be all you need.&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 20:43:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/766910#M2423</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-08-14T20:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/768105#M2425</link>
      <description>&lt;P&gt;Hi Daniel,&lt;BR /&gt;Thanks you so much for your time and help.&lt;/P&gt;&lt;P&gt;With the suggested font family setting, font is closer to matching with built-in card visual.&lt;BR /&gt;Still there is a difference in size.&lt;BR /&gt;Below shows comparison of fonts.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="DINSize.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/185435iAB43D3AA92AC3F98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DINSize.png" alt="DINSize.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left side shows custom visual font with font family set as "wf_standard-font, helvetica, arial, sans-serif"&lt;BR /&gt;and size set as 26px. Right side show custom visual font size set as 26pt and fill color as #000000 for both.&lt;/P&gt;&lt;P&gt;With built-in card following settings are used.&lt;BR /&gt;Card Title set as "Sales YTD":&lt;BR /&gt;Font family: DIN&lt;BR /&gt;Font Color: Black (#000000)&lt;BR /&gt;Background color: No fill&lt;BR /&gt;Text Size: 26 pt&lt;/P&gt;&lt;P&gt;As the solution is working on your end, we are verifying our custom visual code, to see any other settings causing this issue.&lt;/P&gt;&lt;P&gt;Incase you have any other suggession, please let us know.&lt;/P&gt;&lt;P&gt;Thank you. Appreciate your help and time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 02:21:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/768105#M2425</guid>
      <dc:creator>inserv</dc:creator>
      <dc:date>2019-08-16T02:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/768136#M2426</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/162227"&gt;@inserv&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Here's the code I used - I just took yours and added the styling in from inspecting the element in the browser as per my screenshot above, although I modified the font based on the value in the properties pane:&lt;/P&gt;&lt;PRE&gt;this.eleDinTest
    .text("Test DIN")
    .style("font-size", "27pt") // or .style("font-size", 20 + "px")
    .style("font-family", "wf_standard-font, helvetica, arial, sans-serif")
    .style("font-weight", "normal")
    .style("fill", "rgb(51, 51, 51)");&lt;/PRE&gt;&lt;P&gt;Two additional things that might help:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Note that &lt;FONT face="courier new,courier"&gt;normal&lt;/FONT&gt; for &lt;FONT face="courier new,courier"&gt;font-weight&lt;/FONT&gt; is a lower-case 'n'. Your example uses upper-case, which CSS will ignore.&lt;/LI&gt;&lt;LI&gt;If you're using 'pt' vs. 'px' when comparing, your &lt;A href="https://www.w3schools.com/cssref/css_units.asp" target="_self"&gt;CSS unit&lt;/A&gt; of measurement will have a difference. If you're using a visual property as reference, the core ones all use 'pt' now, so I'd suggest replacing your code to match that.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I'm hoping that should be it. If not, feel free to post your updated code and I'll take another look for you.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 02:47:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/768136#M2426</guid>
      <dc:creator>dm-p</dc:creator>
      <dc:date>2019-08-16T02:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/768696#M2428</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your visual works in Sandbox mode, DIN font will not be applied so, there will be applied the next font from the font-family sequence.&lt;/P&gt;&lt;P&gt;DIN font is non-public font and defined out of the sandbox therefore, it works only for core and no-iframe visuals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Evgenii Elkin,&lt;BR /&gt;Software Engineer&lt;BR /&gt;Microsoft Power BI Custom Visuals&lt;BR /&gt;pbicvsupport@microsoft.com&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 14:33:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/768696#M2428</guid>
      <dc:creator>v-evelk</dc:creator>
      <dc:date>2019-08-16T14:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/773792#M2449</link>
      <description>&lt;P&gt;Hi Daniel,&lt;BR /&gt;Thank you so much for quick response.&lt;BR /&gt;Sorry for delay in our response.&lt;/P&gt;&lt;P&gt;We tested with a new pbiviz project.The problem still persists.&lt;BR /&gt;Just to keep it simple, we changed code in constructor() as noted and removed code from update().&lt;/P&gt;&lt;P&gt;Still size rendered do not match PBI card visual.&lt;/P&gt;&lt;P&gt;***Code****&lt;BR /&gt;constructor(options: VisualConstructorOptions) {&lt;BR /&gt;this.target = options.element;&lt;BR /&gt;if (typeof document !== "undefined") {&lt;BR /&gt;const new_p: HTMLElement = document.createElement("p");&lt;BR /&gt;new_p.appendChild(document.createTextNode("Sales YTD"));&lt;BR /&gt;new_p.style.fontSize = "26px";&lt;BR /&gt;new_p.style.fontFamily = "wf_standard-font, helvetica, arial, sans-serif";&lt;BR /&gt;new_p.style.fill = "#000000";&lt;BR /&gt;new_p.style.fontWeight = "normal";&lt;BR /&gt;this.target.appendChild(new_p);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;public update(options: VisualUpdateOptions) {&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;**********&lt;/P&gt;&lt;P&gt;As always, appreciate your help and time.&lt;BR /&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 03:19:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/773792#M2449</guid>
      <dc:creator>inserv</dc:creator>
      <dc:date>2019-08-23T03:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/773796#M2450</link>
      <description>&lt;P&gt;Hi Evgenii Elkin,&lt;BR /&gt;Thank you for your response, time and help.&lt;BR /&gt;Sorry for delay in our response.&lt;/P&gt;&lt;P&gt;Couple of our visuals are live on app store. We have DIN as value for the font DIN.&lt;BR /&gt;We are trying to test suggession from Daniel.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate if you can share your thoughts on following.&lt;BR /&gt;(Due apologies in case the questions are out of your boundary.)&lt;/P&gt;&lt;P&gt;1. It would be helpful to know name/value (Name &amp;amp; value specified in capabilities.json) for all fonts supported by PBI.&lt;BR /&gt;In case you have the list, can you please share it?&lt;BR /&gt;Also if the list notes non-public fonts, we will exclude from our custom visuals for time being.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Do you happen to know how font size be specified - px or pt, across PBI visuals?&lt;BR /&gt;I believe there was a bug noted on the font size and was being addressed.&lt;BR /&gt;Related reference link:&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Issues/Font-size-not-consistent-across-visuals/idi-p/581490" target="_blank"&gt;https://community.powerbi.com/t5/Issues/Font-size-not-consistent-across-visuals/idi-p/581490&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your help and time.&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 03:24:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/773796#M2450</guid>
      <dc:creator>inserv</dc:creator>
      <dc:date>2019-08-23T03:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/774362#M2455</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. The latest API supports standard definition of Font list&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FontFamily.PNG" style="width: 376px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/187172i47D660DC28E059B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="FontFamily.PNG" alt="FontFamily.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However it will add all the possible fonts for Power BI (including these that don't work in sandbox).&lt;/P&gt;&lt;P&gt;However, font list may be defined manually as any enumeration in capabilities.json&lt;/P&gt;&lt;P&gt;Unfortunately, I am unfamiliar with all non-working in sandbox fonts, only DIN, but there may be couple of others.&lt;/P&gt;&lt;P&gt;Honestly, I don't recommend to define them manually because I have discussed this question with persons who is in charge of this question and there is a chance that these fonts may be supported in sandbox in the future.&lt;/P&gt;&lt;P&gt;Also, visuals may work in different modes so, it is better to leave this fonts as is.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. Font size is defined in 'pt' (if it described correctly in capabilities.json)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FontSize.PNG" style="width: 328px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/187178iAD160697AB9FD903/image-size/large?v=v2&amp;amp;px=999" role="button" title="FontSize.PNG" alt="FontSize.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, inside visual it may be transformed into 'px' by the code (if developer decided, but original size storing in 'pt' anyway)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ptConverter.PNG" style="width: 779px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/187180iF5C8EFFE773933C4/image-size/large?v=v2&amp;amp;px=999" role="button" title="ptConverter.PNG" alt="ptConverter.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Evgenii Elkin,&lt;BR /&gt;Software Engineer&lt;BR /&gt;Microsoft Power BI Custom Visuals&lt;BR /&gt;pbicvsupport@microsoft.com&lt;/P&gt;</description>
      <pubDate>Fri, 23 Aug 2019 13:39:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/774362#M2455</guid>
      <dc:creator>v-evelk</dc:creator>
      <dc:date>2019-08-23T13:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/775886#M2471</link>
      <description>&lt;P&gt;Hi Evgenii Elkin,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Thanks so much for response and providing details.&lt;/P&gt;&lt;P&gt;We will try to upgrade our visual to latest version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate your help and time.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 15:55:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/775886#M2471</guid>
      <dc:creator>inserv</dc:creator>
      <dc:date>2019-08-26T15:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Custom visual development - issue rendering font "DIN"</title>
      <link>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/775898#M2472</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thanks for all your help and time.&lt;/P&gt;&lt;P&gt;We will try to upgrade our visual(s) to latest API version.&lt;/P&gt;&lt;P&gt;We shall try your suggession till we upgrade.&lt;/P&gt;&lt;P&gt;Thanks and Best regards.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2019 16:09:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/m-p/775898#M2472</guid>
      <dc:creator>inserv</dc:creator>
      <dc:date>2019-08-26T16:09:26Z</dc:date>
    </item>
  </channel>
</rss>

