View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0030334 | Open CASCADE | OCCT:Visualization | public | 2018-11-02 14:27 | 2019-05-06 15:37 |
Reporter | bugmaster | Assigned To | bugmaster | ||
Priority | normal | Severity | minor | ||
Status | closed | Resolution | duplicate | ||
Platform | Linux | ||||
Target Version | 7.4.0 | ||||
Summary | 0030334: Visualization - missing fonts are not properly reported by Font_FontMgr::FindFont() | ||||
Description | - Font is not changed after changing font after -font - The inscription is beyond the limits of the face (see attached picture) Found on test case demo samples pencil | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
pencil.png (13,478 bytes) |
|
There are two issues: 1. text2brep never returns FALSE for unknown font, because historically font manager returns the following 2 fallbacks: // Requested family name not found -> search for any font family with given aspect and height ... // The last resort: trying to use ANY font available in the system so that error will occur ONLY if font manager is completely empty. Without any warning. 2. Modern Linux distributions might ignore X11 fonts registration (probably in attempt to go for Wayland, etc.), so that the list of registered fonts detected by OCCT is very poor on not customized system (Xubuntu 18.04): Draw[22]> vfont Courier 10 Pitch regular /usr/share/fonts/X11/Type1/c0419bt_.pfb Courier 10 Pitch italic /usr/share/fonts/X11/Type1/c0582bt_.pfb Courier 10 Pitch bold /usr/share/fonts/X11/Type1/c0583bt_.pfb Courier 10 Pitch bolditalic /usr/share/fonts/X11/Type1/c0611bt_.pfb Bitstream Charter bold /usr/share/fonts/X11/Type1/c0632bt_.pfb Bitstream Charter bolditalic /usr/share/fonts/X11/Type1/c0633bt_.pfb Bitstream Charter regular /usr/share/fonts/X11/Type1/c0648bt_.pfb Bitstream Charter italic /usr/share/fonts/X11/Type1/c0649bt_.pfb while system actually has more fonts installed in standard folders. It seems that problem 2 can be solved by relaxing conditions on Linux and reusing font searching code already used for macOS and Android. The problem 1 is more difficult to fix, because if fallbacks will be removed from Font_FontMgr::FindFont(), then it should be moved to other places calling Font_FontMgr::FindFont() or otherwise text will not be displayed at all. Font_FontMgr::FindFont() can be extended with extra flag defining if fallback should be provided or not, but this would look confusing. Alternatively, we may just emit Error messages within Font_FontMgr::FindFont(), so that fallback will be still provided, but user will be able to see that something going wrong. |
|
pensil_OK.png (9,293 bytes) |
|
Dear bugmaster. Please close as duplicate of 0030439. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-11-02 14:27 | bugmaster | New Issue | |
2018-11-02 14:27 | bugmaster | Assigned To | => apn |
2018-11-02 14:28 | bugmaster | Description Updated | |
2018-11-02 14:28 | bugmaster | File Added: pencil.png | |
2018-11-02 14:29 | bugmaster | Assigned To | apn => abv |
2018-11-02 14:30 | bugmaster | Description Updated | |
2019-01-10 21:26 | kgv | Note Added: 0081735 | |
2019-01-10 21:26 | kgv | Status | new => feedback |
2019-01-10 21:27 | kgv | Note Edited: 0081735 | |
2019-01-10 21:28 | kgv | Category | OCCT:DRAW => OCCT:Visualization |
2019-01-10 21:28 | kgv | Summary | -font option of command text2brep works incorrectly on Linux platform when applied to the face => Visualization - missing fonts are not properly reported by Font_FontMgr::FindFont() |
2019-01-10 23:13 | kgv | Relationship added | related to 0030439 |
2019-01-16 00:16 | kgv | File Added: pensil_OK.png | |
2019-01-21 10:58 | kgv | Resolution | open => duplicate |
2019-01-21 10:58 | kgv | Relationship replaced | duplicate of 0030439 |
2019-04-30 14:57 | kgv | Note Added: 0084076 | |
2019-04-30 14:57 | kgv | Assigned To | abv => bugmaster |
2019-04-30 14:57 | kgv | Note Edited: 0084076 | |
2019-05-06 15:37 | bugmaster | Status | feedback => closed |