Hi,
I have some DXF drawings made by someone else in AutoCAD and when I open them in LibreCAD some text is missing and some text is shown garbeled. Check the screenshots below on how it looks in AutoCAD and how it looks in LibreCAD. The yellow text in the first rows has some badly displayed letters. The Red box below does not have any yellow text in it. AutoCAD: LibreCAD: If I try to edit the yellow text, any change I make to it makes it disappear. Is it a bug or it is something I can do about it? Here is the original file: RIGLETA_2_JT_BORD_A.dxf Thanks, Mihai |
Garbled text:
There is a problem in LibreCAD with fonts containing arcs and a differing heigth/width scaling (width factor other than 1). The letters get torn apart then. If you want to change the width factor to 1 you also have to change the alignment to baseline left, otherwise it is not accepted. Just found by experimenting. If you need a width factor other than 1 a workaround is to select a font without arcs, like Simplex, which consists of straight lines only. The garbled text in the red boxes can't be edited as they are part of an inserted block. You have to "explode" that block first. Or you also can edit that block (ind3_12) in the Block List with "Edit the active block in a separate window". I have no answer for the the missing text. As it should appear within that red block, maybe it is a related issue. |
Thank you for reply.
So, regarding the garbled text, if it is a known bug, I will wait for a fix rather than change anything. Do you know a GitHub issue / link related to this? About the red inserted block, in AutoCAD if I double click on the box, an Enhanced Attribute Editor window pops up that shows all the missing text from LibreCAD. It seems that the box is automatically populated with some metadata (?) defined somehow that LibreCAD does not know how to display? It seems that LibreCAD displays the text in the Prompt column, but not the values. |
In reply to this post by dellus
I feel there should be a simple fix for this: use elliptic arcs instead of arcs
If course, that means to modify polylines here to allow elliptic.
|
In reply to this post by SilverGreen93
please create an issue for this in GitHub - https://github.com/LibreCAD/issues
Actually, I'm not sure I fully understand the issue details so far, yet from the very first glance it seems like a bug indeed - and one should be fixed, of course. So please provide as much information as you can there (and thank you for sharing dxf and screenshot, btw). As LibreCAD draws each character of font as polyline, it might be that for the font a different scale factor for x and y is applied (and that might be an issue if there are arcs within the font). Yet anyway, let me check that in more details. |
In reply to this post by dxli
@dxli - It's funny, yet after this post I'm thinking whether we may add support of elliptic arcs to polyline as segment types (in addition to existing line and arc entities) to handle proper scaling of arcs...
That might be nice feature as is, plus we'll get better scaling and also get rid of fonts with arc related issues.. |
In reply to this post by SilverGreen93
> About the red inserted block, in AutoCAD if I double click on the box, an Enhanced Attribute Editor window pops up that shows all the missing text from LibreCAD. It seems that the box is automatically populated with some metadata (?) defined somehow that LibreCAD does not know how to display?
---- I'm not fully sure, yet it seems that values you've referred are attributes of block insert (or block attributes). And text within block refers to these attributes. AutoCAD can so this, LibreCAD has no such support (yet) but it seems that it's nice feature to add... Please also create a separate issue in GitHub for this (ideally, if you could share a couple more dxf with similar situation with blocks with attributes). Thank you. |
In reply to this post by sand1024
Using elliptic arcs could be a hack, but not really compatible with dxf polylines:
https://documentation.help/AutoCAD-DXF/WS1a9193826455f5ff18cb41610ec0a2e719-79f0.htm I am not clear on whether it's the right way to go. Right now, we use only line segments and arcs in fonts, so anisotropic scaling is not possible. A quick could be replacing all arcs by elliptic, and a separate scaling factor (meaning a x-/y-direction 2d factor) can scale the font entities, even for anisotropic cases. Good thing the change could be limited to the text class. Another choice could be quadratic splines(lc_splinepoints), as dxf supports polylines with quadratic splines, but the changes would be in both the text level and also at dxf level. Mtext also has performance and correctness issues. One reason for poor performance could be excess update() calls, due to the tree structures of text. Text alignment needs to based on bounding boxes, https://github.com/LibreCAD/LibreCAD/issues/1894 After that, we need to fix right-to-left, and top-to-bottom language support.
|
@dxli
Yes, you're completely correct. I've just quickly checked dxf format (btw, found a nice doc for it https://documentation.help/AutoCAD-DXF/WS1a9193826455f5ff18cb41610ec0a2e719-79f0.htm) Indeed, support of elliptic arcs will require usage of separate entity POLYLINE and probably hacking with spline segments to support elliptic arcs. So dxf is limiting thing there while supporting elliptic arcs on LibreCAD level should not be complex. Yet the approach you've proposed with updating text/mtext for handling such cases seems to be promising indeed.. |
This post was updated on .
I created these two issues:
https://github.com/LibreCAD/LibreCAD/issues/1946 https://github.com/LibreCAD/LibreCAD/issues/1947 Surprisingly, if you open the file with LibreOffice Draw, text is displayed correctly in both cases, although the font used is not the same :) I wouldn't have expected LO Draw to better support DXF rather than LibreCAD. |
Yes, the trouble is in font implementation, and we had rallaz working on fonts/dxf/dwg for LibreCAD, but after rallaz left the project, we don't have any experienced developer on these fields.
|
Free forum by Nabble | Edit this page |