[ReOpened] Problem with Draft Text display

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
wandererfan
Veteran
Posts: 6326
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Problem with Draft Text display

Post by wandererfan »

Roy_043 wrote: Fri Feb 21, 2020 8:53 am
  1. Draft Downgrade the ShapeString. This will give you one face for each character.
  2. Draft Downgrade the faulty faces to get wires.
  3. Draft Upgrade the wires to turn them into separate faces.
  4. For faces with islands you can use Part Cut. If necessary you can Draft Downgrade the Cut to explode it.
Nice.
You can save the first 2 steps by using wires = Part.makeWireString(text, font, size).
wires is a list of lists [[wires for char1], [wires for char2], ...]. Each wire is a contour from the font definition.
fc_tofu
Posts: 653
Joined: Sun Jan 05, 2020 4:56 pm

Re: [Solved] Problem with Draft Text display

Post by fc_tofu »

Mod, please correct the prefix of OP title. The bug mentioned in op, and most Chinese/CJK/DBCS related bugs (except No.3) in my following post are still unfixed.
Earlier, I commented that No.3 bug was removed by @wandererfan. Perhaps, that comment caused confusion, so I delete that comment now.
1. DraftWB, dAnno and dLabel print Chinese characer in UTF-16 code (not as Chinese font glyph).
2. DraftWB, Dimension>Overide, doesnot print Chinese text on viewport.
[SOLVED] 3. DraftWB, ShapeString donnot apply Chinese font filename (not font family name).
4. DraftWB, dAnno save Chinese text as messy code, and print nothing on viewport.
ps. workaround: edit dAnnot text property, and input Chineset text again. This time dAnno can save Chinese text correcty, and print UTF-16 code on viewport. While dLable has no this issue.

fsc_2020-02-13_171039.jpg
fsc_2020-02-13_171039.jpg (123.05 KiB) Viewed 330 times

5. On Windows10x64, only Arial (arial.ttf) and Courier (cour.ttf) can be apply to DraftWB's dAnnno/dLabel/Dimension. Fallback font is FreeCAD's internal font. All these fonts (arial/courier/internal) donnot support DBCS/CJK.
https://forum.freecadweb.org/viewtopic.php?f=23&t=38305
6. Preferences> Genereral> Editor> Family, donnot save Chinese font family name in "user.cfg" file.
https://forum.freecadweb.org/viewtopic.php?f=34&t=42803
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [ReOpened] Problem with Draft Text display

Post by Kunda1 »

Done
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply