Skip to content

Add support for converting text in SVGs to paths#5390

Merged
laurmaedje merged 5 commits intotypst:mainfrom
LaurenzV:outlined
Dec 8, 2024
Merged

Add support for converting text in SVGs to paths#5390
laurmaedje merged 5 commits intotypst:mainfrom
LaurenzV:outlined

Conversation

@LaurenzV
Copy link
Collaborator

@LaurenzV LaurenzV commented Nov 7, 2024

No description provided.

@LaurenzV
Copy link
Collaborator Author

LaurenzV commented Nov 7, 2024

Note: In the future, we could consider instead making it a parameter on text so that you can do #set text(outlined: true), and it will automatically apply to SVG figures too. Once we have that, we could deprecate this parameter. But since this probably won't be added in the near future, this is probably the best option for now.

@MDLC01
Copy link
Collaborator

MDLC01 commented Nov 7, 2024

I don't really like the name outlined. It looks like it has something to do with the outline element, and other outlined parameters such as on figures, images, etc..

@LaurenzV
Copy link
Collaborator Author

LaurenzV commented Nov 7, 2024

The only alternatives I can think of are selectable or embed-text.

@MDLC01
Copy link
Collaborator

MDLC01 commented Nov 8, 2024

I like embed-text better.

@laurmaedje
Copy link
Member

Do we really want to expose this? I don't really see why people would want this except for the use case of creating unselectable text in Typst generally, for which this is merely a bad workaround.

@LaurenzV
Copy link
Collaborator Author

LaurenzV commented Nov 8, 2024

I mean, five people upvoted the comment in #1239, so I guess there is some demand at least? But I'm fine with either.

@laurmaedje
Copy link
Member

I wonder whether the use case in the upvoted comment could be solved in some way via PDF tagging. Maybe not.

@LaurenzV
Copy link
Collaborator Author

LaurenzV commented Nov 8, 2024

I wonder whether the use case in the upvoted comment could be solved in some way via PDF tagging. Maybe not.

If it does, it probably would only work in Acrobat anyway. 😄

@laurmaedje
Copy link
Member

I'm okay with this, but don't like the name embed-text. I think it's not fully clear what false vs true means with this name (embed could just as well mean to "embed" it as real text). How about flatten-text?

@laurmaedje laurmaedje added the waiting-on-review This PR is waiting to be reviewed. label Nov 29, 2024
@laurmaedje laurmaedje removed the waiting-on-review This PR is waiting to be reviewed. label Dec 8, 2024
@laurmaedje laurmaedje added this pull request to the merge queue Dec 8, 2024
@laurmaedje
Copy link
Member

Thanks!

Merged via the queue into typst:main with commit 67ef606 Dec 8, 2024
@LaurenzV LaurenzV deleted the outlined branch December 8, 2024 17:24
laurmaedje added a commit that referenced this pull request Jan 31, 2025
This reverts #5390

Adding a configuration for making text unselectable in Typst more generally (e.g. `set text(selectable: false)`) is realistic in the near future and this will naturally allow for `show image: set text(selectable: false)`. For this reason, I'd rather not release a parameter that we already know will be obsolete soon.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants