[Connect C++ ]_ProcessAsFacets is font dependent?

I asked this but seems got lost in the long thread, so I want post this in a new topic:

We tried _ProcessAsFacets() way for text tessellation, in most case it works fine. One thing we noticed is in some case the text tessellation failed and we suspect it's due to the machine missing font used in MicroStation design file. Is it the case? If so what's the suggestions for it?

One example is we created some text in one machine installed MicroStation and try tessellate it in another machine (Without MicroStation installed), the tessellation result failed. 

  • Glyph geometry can be represented as closed regions or as open curves. The latter is informally referred to as 'stick text'. Only the former can be processed as facets - there's no way to make a meaningful mesh out of a collection of open curves. Either type can be processed as a CurveVector.

    If a font is not installed on the machine, the default fall-back font is used. I suspect your default fall-back font is a 'stick text' font.

  • Sorry for late response. Some more research to report, we separated fonts into 3 categories: MicroStation resource fonts, AutoCAD fonts and MS system fonts, 

    We return false for _ProcessAsBody, return true for _ProcessAsFacets, and later we collect meshes and curves in _ProcessFacets & _ProcessCurveVector. Below are the result of the tessellation behavior:

    1. the AutoCAD fonts are totoally lost because AutoCAD needs to be installed if using this font.
    2. the resource fonts are replaced by a default font.
    3. the Windows MS fond are well supported.

    Any idea on the AutoCAD fonts tessellation supports? We tried put some fonts into system font library but rejected by Windows. 

    Thanks,

    Danny

  • We created some text in one machine installed MicroStation and try tessellate it in another machine (Without MicroStation installed), the tessellation result failed
    • the AutoCAD fonts are totoally lost because AutoCAD needs to be installed if using this font.
    • the resource fonts are replaced by a default font.

    I believe that you're using an SDK to create an app. that runs outside MicroStation.  The SDK is using MicroStation DLLs and expects to find resources, such as fonts, in well-known locations.  By well-known I mean that MicroStation knows about certain folders that are specified in configuration variables.  For example, MicroStation font resource folders and AutoCAD font folders.

    If you're running independently of MicroStation then those configuration variables are undefined.  Consequently, your app. can't locate the right folders.  I don't know the solution for that because I don't have access to the SDK that you are using.

    Most of us don't use that SDK — we develop apps. that run in-process (i.e. DLLs).  We use MicroStation's configuration engine to find the right folders.

     
    Regards, Jon Summers
    LA Solutions

  • Yes we are using SDK to create out process applications. Thanks all the same.

  • Not clear what SDK you are using. If you are not using the MicroStation SDK, and therefore have limited access to fonts, there is not much I can do to help. If your fallback font is stick text (have you confirmed this? If unsure post a screenshot or something) then it can't be tesselated...

  • Sorry for not make myself clear. I am using the SDK called "DGNPlatform SDK", I am not sure if this is what you called MicroStation SDK? This is delivered by Robert Hook if you interested who shared with us. 

    Regarding to the "stick font", I don't know how to confirm. I have posted one screenshot which write different strings with different fonts and the tessellation results comparing. I notice some font failed after tessellation, but I don't know if they are stick or not. 

    -Danny

  • I don't know if they are stick or not

    By stick font, Paul means that the font is made of lines and not closed shapes.  I think that most of the MicroStation resource fonts are stick fonts.  Some AutoCAD fonts are also stick fonts.  The Windows fonts are TrueType , which are closed curves, which is why they tesselate for you. Windows also provides ClearType, which is designed to display well on LCD screens.

    Fonts have changed over the years.  When MicroStation was invented (three decades ago), computer graphics was primitive compared to nowadays.  Stick fonts were designed to draw quickly.  They are simple, not filled, and unsuitable for tessellation.  These days most of us use TrueType filled fonts, which today's graphics hardware can draw easily and also print well.

     
    Regards, Jon Summers
    LA Solutions