wolfmanstout / talon-gaze-ocr

Talon scripts to enable advanced cursor control using eye tracking and OCR.
53 stars 26 forks source link

Black background (not translucent) / missing text and ugly font choice on Windows #7

Closed nriley closed 2 years ago

nriley commented 2 years ago

Here's a workaround (actually simpler than what you do now) - create debug/disambiguation canvases using Canvas.from_screen, for example:

disambiguation_canvas = Canvas.from_screen(screen.main())

I found the appearance is improved if you remove c.paint.typeface = "arial" - Skia picks something OS-specific which looks better.

Here's how it looks now with everything fixed:

image

Also would recommend not using embolden (synthetic bold) when fonts should have true bold. I was able to construct a true bold system font like this:

                from talon.skia.typeface import Typeface, Fontstyle
                c.paint.typeface = Typeface.from_name('', Fontstyle.new(weight=700, width=5))

Or to go back to the system font:

               c.paint.typeface = ''
wolfmanstout commented 2 years ago

These all sound like great changes! Do you want to just send me a pull request? If for some reason that would be difficult, I can make the changes myself.

nriley commented 2 years ago

Sure, I can do that, it may be a week or so - very busy this week and traveling this weekend.NicholasOn Sep 19, 2022, at 11:42 PM, James Stout @.***> wrote: These all sound like great changes! Do you want to just send me a pull request? If for some reason that would be difficult, I can make the changes myself.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

nriley commented 2 years ago

Sure, I can do that, it may be a week or so - very busy this week and traveling this weekend.NicholasOn Sep 19, 2022, at 11:42 PM, James Stout @.***> wrote: These all sound like great changes! Do you want to just send me a pull request? If for some reason that would be difficult, I can make the changes myself.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>