Open gedw99 opened 17 hours ago
Oh the built in Cartesian system is based on lower left according to README.
https://github.com/ajstarks/decksh/blob/master/generate.go is where the logic is.
Looking at each function that represents each Deck DSL element, I am not sure how easy this will be.
I am trying to work out how much refactoring is needed. Due Diligence...
All the Deck Renderers like PDF, PNG and SVG run off the Deck generation and so should , I think, not need any changes os some minor ones.
They all have the func of "DoSlides", that create a Deck, and then renders it.
The SVG Renderer ...
https://github.com/ajstarks/deck/blob/master/cmd/svgdeck/svgdeck.go#L462
The PDF Render ...
https://github.com/ajstarks/deck/blob/master/cmd/pdfdeck/pdfdeck.go#L670
Here is a good example of LTR and RTL support:
https://www.hyperui.dev/components/application-ui/login-forms
The button called RLT / LTR toggles it...
I don't think you need to alter the coordinate system. However, if you can manage this in the renderers (perhaps controlled with a command line option).
Speaking of text direction, deck positions text at arbitrary coordinates, left, center, right. The deck client can use these coordinates as it sees fit.
thanks @ajstarks
couple of things on my mind about this approx h that I want to question if I may …
Maybe I’m missing something but the decksh generate produces a xml .
this xml has the exact positions already determined for all the renderers to use .
so does it not make sense to do this work in the decksh generate file ?
Site the flags / args will need to tell each Renderer the lang , etc of course.
Deck has a cartesian basis on top left, I think :)
If I can change that cartesian basis to be top right, maybe I can easily make deck to LTR and RTL.
This would mean all Decks can work for all countries and people automatically.
If anyone else has thoughts on this would love to hear your thoughts.
Seems the best way is to pass in some arg to the cmd to tell it LTF or RTL.
Other factors like i18n for Text, Number, Dates and Times, etc will also need to be addressed.
In which case, passing in the locale would be the flag.
But for now the LTR / RLT is the big one I think. Can we easily alter some root basis code and get the thing doing LTR and RTL easily ...