New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix handling of text scaling #182
Conversation
Fixes #179. This patch is very much along the lines outlined in comments on the ticket. There will be accompanying patches to backends.
Accompanies diagrams/diagrams-lib#182.
This may be a non-trivial change for SVG as we don't carry around the accumulated style like we do in cairo? |
Drat, you're right. I will ponder it a bit. |
Curses, this is really annoying. The options seem to be (1) implement something similar to |
(1) Given the way you describe On the other hand refactoring SVG in this way just to handle text doesn't feel like good design. (3) I'm not as upset about this option, it gives as another reason to think seriously about implementing fix point semantics. We can revert back to the way text is handled in 1.1, i.e. not make font size of type |
Oh! Wait, I honestly forgot we already used a state monad for SVG. I think it may not actually be too hard. I'm taking another look at it now. |
For (2) don't we need something like that if we are going to add sharing by On Sat, May 3, 2014 at 1:50 PM, Jeffrey Rosenbluth <notifications@github.com
|
Yes, but I don't see what all of this has to do with fixing text scaling. |
Nothing really. If we wind up needing both |
@byorgey I was just speaking to @jeffreyrosenbluth's comment:
|
Ah, I was wondering what you (@fryguybob) where referring to. On Sat, May 3, 2014 at 2:14 PM, Ryan Yates notifications@github.com wrote:
|
I don't think we really need |
It wasn't that bad after all. Whew. |
This should be ready to merge now. The only issue is with the postscript backend, which would actually be annoying to fix in the way I thought the SVG backend would be. |
fix handling of text scaling
Hello all! I saw these changes, and figured I'd mention that some other code changes might be warranted: Do these changes affect the Diagrams.Backend.Cairo.Text module? Maybe some documentation should be added there to explain how to "properly" do this with measures / the fixpoint semantics. Should these operations even still be around? They are more efficient than doing multiple operations, but they can be error-prone, when the extra style argument is incorrectly supplied. Can the fixpoint semantics measures stuff eliminate the need for the |
Ah, good call. Though I'm not sure any code changes are needed... I don't even think there's currently any way for those to work properly for anything other than a |
Empirically,
I need to think more about why this is, and what the behavior should be. |
The relevant call chain goes like this: |
Fixes #179. This patch is very much along the lines outlined in
comments on the ticket. There will be accompanying patches to backends, so maybe we should wait to merge until we have all the backend fixes in place.