Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

[CONNECT C++] Question about FontMaps

$
0
0

I'm dumping out a list of Font Names and Numbers in the DgnFile:

extern	"C"	DLLEXPORT void ListAllFonts(WCharCP unparsed)
{
	DgnFontNumMapP		fontNumMap = DgnFontManager::GetDgnFontMapP(ACTIVEMODEL);	// All fonts in DgnModel

	DgnFontListPtr		pFontList = fontNumMap->CreateUsedFontList();
	//DgnFontListPtr		pFontList = fontNumMap->CreateUsedFontList(DgnFontFilter::Resource);

	wprintf(L"Number of Fonts in DgnFile: %d\n", pFontList->GetCount() );

	for ( UInt i=0; i<pFontList->GetCount(); i++ )
	{
		DgnFontP		pFont = pFontList->GetEntryP(i);
		UInt32			fontNum;
		fontNumMap->GetFontNumber(fontNum, *pFont, false);
		wprintf(L"[%d] FontNum:%d, %s\n",i, fontNum, pFont->GetName().c_str() );
	}
}

 

However, when I run the code, all I get are TrueType fonts:


As you can see, my model (DgnFile) uses a Resource font (SRS Standard):


So if I re-run the code and specify "DgnFontFilter::Resource", then NO fonts are returned:


So what am I doing wrong?

 

Bruce


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>