Profitbase / PowerBI-visuals-FinancialReportingMatrix

Power BI Custom Visual for Financial Reporting
72 stars 24 forks source link

DIN fonts doesnt work #270

Open bckstrm opened 3 years ago

bckstrm commented 3 years ago

Hi,

Great work with the visual! However, the fonts DIN & DIN Light doesnt work. All other fonts seems to work but these two defaults to Arial. Don't know if its related to the old font bug involving DIN - https://community.powerbi.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/td-p/766692

Matrix and all other visuals works with DIN. Also no difference if i use the new Format pane or the old one.

DIN - image Arial - image Comic Sans MS - image Example PBIX - DIN Example PBIX.zip

msmzibra commented 2 years ago

@AndersAano Any news on this issue? As of today this still remains a bug.

toresenneseth commented 2 years ago

Hi,

Does the DIN-font work for any other visuals? The DIN-font works for me, because it's installed on my OS. I do not have DIN Light installed, so it does not work.

msmzibra commented 2 years ago

Yes DIN-font work for all other visuals in my 10 page report. When I select DIN in the menu it defaults to Arial.

toresenneseth commented 2 years ago

Are the other visuals custom visuals, or built-in Power BI visuals?

msmzibra commented 2 years ago

Both. Most of them are native MS visuals.

msmzibra commented 2 years ago

Calibri: image

Arial: image

DIN: image

msmzibra commented 2 years ago

All my other visuals on both this pages and the rest are working perfectly with DIN-font.

toresenneseth commented 2 years ago

According to Microsoft, DIN fonts will not work for custom visuals, because they run inside a sandbox (iframe).

https://community.powerbi.com/t5/Custom-Visuals-Development/Custom-visual-development-issue-rendering-font-quot-DIN-quot/td-p/766692

Not entirely sure why, but it can be due to some licensing issues...

bckstrm commented 2 years ago

@toresenneseth Same for me, DIN works for both stock and third party visuals (OKVIZ Cards with States for example). I don't have DIN installed locally as it's not part of the OS (Windows 10/11)

toresenneseth commented 2 years ago

Just to clarify, the font selector and the font name is provided by the Power BI custom visuals API. We do not create that font list or anything. We just pass the selected value on to be rendered. By looking at the DOM (rendered HTML), when you select DIN from that list, it returns something else than DIN. We'll have to investigate why.

msmzibra commented 2 years ago

Cool. I'm looking forward to hear whether you succeed in fixit this bug :)

Thanks.

toresenneseth commented 2 years ago

All the Microsoft docs says that the DIN font will not work for custom visuals. It's interesting that you say that some custom visuals supports this font, when (according to the docs) they should not be able to.

msmzibra commented 2 years ago

Bullet Chart by OKVIZ works with DIN if you want to test it :)

AndersAano commented 2 years ago

Are these other custom Visuals certified? Could that be a difference?

msmzibra commented 2 years ago

@AndersAano I think that your assumption is correct. Tried two non-certified visuals where DIN defaulted as Arial.

bckstrm commented 2 years ago

Cards with States is certified and handles DIN correctly. Interesting DIN shows as font-family: wf_standard-font in stock visual, Card with States and in Profitbase. However, its only broken in Profitbase. Will try tomorrow to see if i can spot any difference in the DOM.
https://appsource.microsoft.com/en-us/product/power-bi-visuals/wa104380967?tab=overview

toresenneseth commented 2 years ago

Having tried several custom visuals, it seems like OKViZ visuals are the only custom visuals that supports the DIN font. I checked with the Power BI dev team, and they confirmed that the DIN font does not work for custom visuals.

OKVIZ has probably embedded the DIN font into the visual, but we do not know which DIN font Microsoft is using (there are several), so we need to find that out first before we can support it.

bckstrm commented 2 years ago

@toresenneseth You are absolutley right, i found that OKVIZ has included the font directly in the CSS, base64-encoded. To bad Microsoft don't have this natively supported.

JeanDeLaColline commented 8 months ago

Hello, I have just become aware of this discussion. Has there been any progress on this issue since 2022? Is the integration of the "DIN" font a development that is being considered on your end? Thank you in advance. John