Skip to content

embedded SVG text should be selectable.  #1239

Closed

Description

@taylorh140

Description

I notice that when an svg is embedded. It is a vector graphic but all the text that was in the original is no longer selectable. (e.g. I cannot copy text from it). This inserts a clear distinction between typst raw output vs typst -> svg -> typst output. but mostly its a little inconvenient.

Use Case

For functional documents copy and paste reduces translation errors. This is part of the reason that embedding a svg/pdf is preferable to raster formats. Allowing text to be selectable from embedded vector graphics would make the svg embedding more useful.

Activity

  1. added
    feature request
    on May 17, 2023
  2. added
    svg
    on May 17, 2023
  3. hcsch commented on May 17, 2023

    @hcsch

    I agree that selectable text in embedded vector images would be nice, but if that is added it would be great to make that an opt-in/opt-out feature. Selectable text in a diagram with paragraphs wrapped around it would for example mess up the paragraph's text when trying to copy just that, so making some graphics like diagrams have non-selectable text, and other graphics like external tables have selectable text would be desirable, I think.

  4. mhdadk commented on Jan 11, 2024

    @mhdadk

    Is there any update on this? This would be a really useful feature to have.

  5. LaurenzV commented on Jan 24, 2024

    @LaurenzV
    Collaborator

    Unfortunately not, I've been wanting to work on this but it does take some effort and I haven't had the time. :/

  6. mhdadk commented on Jan 24, 2024

    @mhdadk

    Unfortunately not, I've been wanting to work on this but it does take some effort and I haven't had the time. :/

    No problem at all. Typst is already incredible as it is, and I'm very grateful for your work so far. This is more of a "nice-to-have" at the moment for me.

  7. LaurenzV commented on Mar 30, 2024

    @LaurenzV
    Collaborator

    Happy to say that that text preservation has been implemented upstream, so the odds are good that we can have this in Typst as well by the next release.

  8. taylorh140 commented on May 17, 2024

    @taylorh140
    Author

    Just checked if this has changed in 0.11.1?

    • It doesn't seem to have. typst 0.11.1 (5011510)
      Keep open.
  9. laurmaedje commented on May 17, 2024

    @laurmaedje
    Member

    Yeah, 0.11.1 was just a patch release. This will be part of the next proper release, 0.12.

  10. LaurenzV commented on Jun 6, 2024

    @LaurenzV
    Collaborator

    Works on main now. :)

  11. utdelsec commented on Nov 7, 2024

    @utdelsec

    During the latest release, this has eradicated the only simple way of producing unselectable text. @hcsch is right. There are instances where this functionality needs to be toggled off. Is there a plan to make it configurable? This will also address: #2249

  12. LaurenzV commented on Nov 7, 2024

    @LaurenzV
    Collaborator

    I opened a PR: #5390

    Although keep in mind that this doesn't solve #2249, because architecturally speaking SVG text and normal text are handled completely separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestsvg

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions