<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://communities.bentley.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>[CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/products/programming/microstation_programming/f/microstation-programming---forum/235194/connect-10-10-c-missing-fonts</link><description>I&amp;rsquo;m trying to figure out if there is a way to get a list of missing fonts either by the message center or other means using the API. I want to be able to pull this into a list so that we can make sure the fonts are added to the completed projects.</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/732820?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 19:55:16 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:bce979e2-d42a-49ef-b761-e906f27f2bf7</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1106327" url="~/products/programming/microstation_programming/f/microstation-programming---forum/235194/connect-10-10-c-missing-fonts/732812"]What I&amp;#39;m attempting to do is find these fonts that are missing and produce a list of them. I&amp;#39;m just not sure how to tell that the font was not found[/quote]
&lt;p&gt;That&amp;#39;s clearer!&lt;/p&gt;
&lt;p&gt;In the MicroStationAPI, a &lt;code&gt;DgnTextStyle&lt;/code&gt; has a &lt;code&gt;DgnFont&lt;/code&gt;. A &lt;code&gt;DgnFont&lt;/code&gt; has member properties...&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;GetName ()&lt;/code&gt; &lt;cite&gt;Get the name for this Font&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;IsPresent ()&lt;/code&gt; &lt;cite&gt;Determine whether this Font is present on the system&lt;/cite&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;IsMissingFontReported ()&lt;/code&gt; &lt;cite&gt;If the font is &amp;quot;missing&amp;quot; from the system, check whether the user has been notified about the missing font&lt;/cite&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a given DGN file, you must...&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Enumerate all text elements, and build a list of text styles&lt;/li&gt;
&lt;li&gt;Enumerate the text styles and evalue the font in each style&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Those classes exist, with the same names, in the DgnPlatformNet API.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/732812?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 18:58:27 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:92c9d46e-dc1b-4cc9-bf9a-9d093193f92c</guid><dc:creator>James Griffith</dc:creator><description>&lt;p&gt;We are getting projects that have custom fonts used on text and not receiving the fonts with projects. The missing fonts are being set to standard or other default fonts when the file is opened. What I&amp;#39;m attempting to do is find these fonts that are missing and produce a list of them. I&amp;#39;m just not sure how to tell that the font was not found.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/732807?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 18:21:07 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:17c59344-2905-4c43-b730-15e6b1a0cb5e</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="1106327" url="~/products/programming/microstation_programming/f/microstation-programming---forum/235194/connect-10-10-c-missing-fonts/732801"]Is there a way to tell if a font has been changed[/quote]
&lt;p&gt;A font where?&lt;/p&gt;
&lt;p&gt;Windows stores &lt;em&gt;TrueType&lt;/em&gt; Fonts (TTF) in its &lt;a title="PC Mag: How to Manage Your Fonts in Windows" href="https://uk.pcmag.com/migrated-3765-windows-10/140321/how-to-manage-your-fonts-in-windows" rel="noopener noreferrer" target="_blank"&gt;system folder&lt;/a&gt;.&amp;nbsp; If you want to find when a system font has changed (a rare event) you need to write some Windows code.&lt;/p&gt;
&lt;p&gt;Or are you asking if an event is raised if a MicroStation text style font is changed?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/732801?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2022 17:45:40 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:e3519c7a-7efb-4385-a458-5ef7e3ed1bdb</guid><dc:creator>James Griffith</dc:creator><description>&lt;p&gt;Is there a way to tell if a font has been changed or some kind of flag is set?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/730768?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 15:17:48 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:1b43e936-7cfd-46cb-a0d9-e2f962a104db</guid><dc:creator>Robert Hook</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/de0601d9_2d00_ca2e_2d00_4005_2d00_a7b3_2d00_982abaee9aeb"&gt;Jon Summers&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;The original page linked has been removed and a new &lt;a href="/products/programming/w/wiki/35637/font#CPP_ListAllFonts" rel="noopener noreferrer" target="_blank"&gt;ListAllFonts() C++ Code Snippet&lt;/a&gt;&amp;nbsp;entry made (1) level higher; since the original page (and other similar) had (2) issues:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The page was named C++.&amp;nbsp; The page name was in conflict with other page(s) of the same name.&amp;nbsp; Our Community software limitations/restrictions should not permit this in the first place.&lt;/li&gt;
&lt;li&gt;The table text (not table) had formatting issues. I was able use the Clear Formatting option in the text editor to correct the format information likely applied during an (RTF?) copy and paste operation.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Hopefully the new page (updated my original recommendation) is more presentable and others can be updated similarly if/when encountered.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;br /&gt;Bob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/730759?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 14:32:36 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:775fba18-b94e-4107-bba9-2ce4aec7e970</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="2163" url="~/products/programming/microstation_programming/f/microstation-programming---forum/235194/connect-10-10-c-missing-fonts/730749"]In C# call using a similar construct to the&amp;nbsp;&lt;a href="/products/programming/w/wiki/35638/c" rel="noopener noreferrer" target="_blank"&gt;ListAllFonts() C++ Code Snippet&lt;/a&gt;[/quote]
&lt;p&gt;It&amp;#39;s good to see an example.&amp;nbsp; Unfortunately the formatting of that Wiki almost hides the C++ code!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/730749?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 14:09:30 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:3c8780d7-7f2b-4d05-b8d2-9c8066c21bd9</guid><dc:creator>Robert Hook</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="/members/6209d78a_2d00_c78f_2d00_47cd_2d00_85ee_2d00_90a191ada6bb"&gt;James Griffith&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Sorry, I do not have a C# code snip readily available though you should be able to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In C# call using a similar construct to the&amp;nbsp;&lt;a href="/products/programming/w/wiki/35637/font#CPP_ListAllFonts" rel="noopener noreferrer" target="_blank"&gt;ListAllFonts() C++ Code Snippet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Then further modify (like below) passing all desired font&amp;nbsp;attribute filters needed; including the &amp;quot;Missing&amp;quot; fonts attribute:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; DgnFontListPtr allFonts = DgnFontManager::CreateKnownFontList (ISessionMgr::GetActiveDgnFile (), (DgnFontFilter)(DgnFontFilter::Resource | DgnFontFilter::Shx | DgnFontFilter::ShxBig | DgnFontFilter::Symbol | DgnFontFilter::TrueType | DgnFontFilter::Missing | DgnFontFilter::Hidden));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;HTH,&lt;br /&gt;Bob&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/730632?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 06:13:50 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:f81372fe-ce4c-42c9-a2c5-8922031f287e</guid><dc:creator>Jon Summers</dc:creator><description>[quote userid="3026" url="~/products/programming/microstation_programming/f/microstation-programming---forum/235194/connect-10-10-c-missing-fonts/730564"]Would you need to parse all the text &amp;amp; text nodes to see what font was being used to cover when &amp;quot;None&amp;quot; was the textstyle?[/quote]
&lt;p&gt;Yes &amp;mdash; but one step at a time!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/730564?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 01:48:29 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:49f103ea-a540-4e9a-b0d0-dbee00f17c03</guid><dc:creator>Mike Robertson</dc:creator><description>&lt;p&gt;Jon,&lt;/p&gt;
&lt;p&gt;Would you need to parse all the text &amp;amp; text nodes to see what font was being used to cover when &amp;quot;None&amp;quot; was the textstyle?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [CONNECT 10.10 C#] Missing Fonts</title><link>https://communities.bentley.com/thread/730549?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 22:05:09 GMT</pubDate><guid isPermaLink="false">6dad98f5-dbc9-4c4d-a9ba-e9da8dc6aa8e:f641046a-89fe-4cb2-94b7-5b92a3e472ac</guid><dc:creator>Jon Summers</dc:creator><description>&lt;p&gt;When MicroStation first opens a DGN file, it provides a list of missing fonts in the &lt;em&gt;Message Center&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;If you want to do the same programmatically, then enumerate all text styles (found in DGNLibs).&amp;nbsp; Compare the font used by each style with the available Windows fonts.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>