Closed erikaharrison-adsk closed 3 months ago
Update: Moved textMetricsUnit from TextStyle, ParagraphStyle, ColumnStyle to SimpleText and MarkupText. Whether the unit of a metrics is world unit, pixel or publishing point should be a property of a text primitive. All the styles bound to the primitive should have the same metrics unit.
Thanks for putting up this PR, Erika! I'm going to confer with some folks internally to get some feedback going. Some early feedback was:
Thanks for putting up this PR, Erika! I'm going to confer with some folks internally to get some feedback going. Some early feedback was:
- Would it be possible to include some usda samples of what the data would look like?
- Is possible to include a comparison to our Preliminary Text schema just for completeness. It looks like yours is much more feature full, but it would be helpful for some third party folks who'd been using our schema to envision how they'd have to upgrade their data, specifically if there are any parameters that aren't accounted for.
- Is MarkupText the same formatting as used by Markdown? Is there a reason not to have HTML as one of the rendering methods, as it is more common for some UI level text in various frameworks such as Qt (and of course the web). That said, SwiftUI does support Markdown formatting so markdown syntax would naturally fit there as well
- Similarly, for styling, has it been considered to use a CSS string? One worry is that we'd have to reimplement a lot of pre-thought out styling here whereas CSS (as complex as it is) has a lot of that legwork done. This would be also similar to how Qt defers more advanced styling to stylesheets while still supporting some parameters to be set directly.
Thank you for your comments.
We use MTEXT as the default support because it is widely used in our Autodesk product.
We didn't consider to use CSS string for styling. Indeed our implementation was a porting from a traditional text system we already used for years.
Update pushed. Please let us know if this addresses things.
Description of Proposal
This is a proposal on supporting the text primitive within OpenUSD.
Supporting Materials
N/A
Contributing