freenode/#clim - IRC Chatlog
Search
6:06:58
loke
This is what I get, and I think this is becasue Freetype uses a y-up coordinate system for its trnsformation matrix while clim uses y-down:
6:07:40
loke
Is there some transformation I can apply on the matrix to get the character rotation right?
6:31:27
beach
So the text is supposed to go in the direction it shows, but the characters are rotated the wrong way?
6:33:20
beach
You should be able to compose the rotation transformation with some transformation that flips the y coordinate.
6:43:39
beach
So you should probably compose the rotation transformation with some other transformation.
6:46:15
loke
As you can see, text-size measurements gets slightly confused when you mix RTL and LTR text in a single string.
6:47:13
loke
Oh wait... that's actually correct. There is a space rendered to the far left... That space is actually locaed between CLIM and the arabic text, but it's been interpreted as coming after the LTR run
6:51:52
loke
The funny thing is that I feel like Knuth in a way... He too went down a rabbit hole when all he wanted to do was to render maths. :-)
6:52:20
loke
All of this, freetype, harfbuzz, fontconfig, transofrmations, xrender, blah blah, is because I want my Climaxima to render pretty maths :-)
6:53:36
loke
beach: By the way... Should an output record remember the transformation that was in effect when it was, well, recorded?
6:55:17
beach
The effect of the specified "user" transformation (composed with the medium transformation) must be captured;
7:15:23
slyrus_
you want climaxima to render pretty maths and I want some sort of next-gen scigraph that looks more like ggplot2 (in R-land).
7:36:20
loke
Currently, my test code is here. Very ad-hoc at the moment, and probably not ready for anyone to test. But you could try if you feel machosistic. :-) https://github.com/lokedhs/clim-test/blob/master/cmdline.lisp
7:48:36
loke
Can anyone try this program and tell me if they see the same issue? https://github.com/lokedhs/clim-test/blob/master/simple-text.lisp
7:48:57
loke
As you can see, this is two boxes, drawing with a trqansformation. One of them is drawn via an output record.
7:49:17
loke
First, they both display dorrectly, but try to press return in the interactor, and the one from the output record disappears.
7:49:42
loke
I think it's trying to redraw it, but since output records and transformations seem to be broken, it doesn't redraw.
12:35:32
TMA
is there a visual guide to the clim specification? some diagrams displaying the relationships between classes, protocols and generic functions
13:19:42
loke
jackdaniel: The probelm is that when an output record is being _replayed_ the medium doesn't have the original transformation anymore.
13:21:39
loke
jackdaniel: I see. Do you have an example of an output record type that does this that I can look at? The draw-text output record uses a macro ro create the output record class and it relies 100% on the arguments passed into the function.
13:27:32
loke
jackdaniel: A rectangle is recorded as a polygon if there is a transformation in place
13:27:34
jackdaniel
if we *really* need to save the transformation, I think that another graphics-state mixin should be added in medium
13:28:19
loke
I was a bit surprised when I saw it... Without a transformation during recording, it's a rectrangle-output-rectord or something like that. If you have a transformation, it's a polygon-output-record (I think)
13:28:44
loke
I think the reasoning behind this is that you should be able to apply yet another transformation when replaying an output record.
13:29:53
loke
Yes. Then a composite transformation can be created so that the text renderer is able to properly render the result.
13:52:15
loke
In most case (all other cases?) it's a matter of simply recording the transformed coordinates, which is what thinks like draw-line, draw-rect etc do
13:52:35
loke
The two main exceptions are: Text (as we already know) and Images (also a known limitation)
14:14:01
beach
loke: slyrus may be able to help. I think opticl does it and that is what McCLIM uses these days I think.
14:18:38
loke
beach: Yes, it's either that or I'll have to write an image transformer by hand. I have done that in the past, so I think it will be much easier to fix that one than the font rendering I've been working on.
14:22:56
loke
beach: Do you jave any idea what the root cause could be? (assumeing you tested my example program)
14:23:34
beach
loke: Possibly that the transformations of output records are not relative, but absolute compared to the sheet (as I recall).
14:25:30
loke
beach: Ah no. I realised that the issue with the output record in my example is unrelated to the rotation.
14:25:44
loke
It's just that I'm suffering from both issues at the same time in my test code for the fonts.
14:26:20
loke
My example program just draws two boxes, and even if you skip the transformation, the secodn one edisappears when you press reeturn, but it gets partially redrawn when resizing the window.
14:37:34
beach
I have been busy all day, cooking for, and then working with, my favorite coauthor. I just came back after emptying the dishwashwer.
14:57:24
beach
loke: I fully meant to run your program, but I find I am too tired after a long day of work. Could you remind me tomorrow maybe?
15:52:57
slyrus_
also, I may have pointed you to this before but if you want to see where I hit the wall trying to mess with transforms and redrawing, etc... check out https://github.com/slyrus/zoom-viewer
15:55:49
loke
slyrus: they still don't work with output records though which is why you'll get some weird behaviours.
16:04:31
loke
If anyone wants to solve the non-text-transformation-related issue, I would be incredibly grateful, because that one really bugs me. :-)