iseahound / textrender Goto Github PK
View Code? Open in Web Editor NEWSimple and minimalistic graphics engine for displaying text on screen. Supports AutoHotkey v1 and v2.
License: MIT License
Simple and minimalistic graphics engine for displaying text on screen. Supports AutoHotkey v1 and v2.
License: MIT License
tr := new TextRender
tr.draw("hello world!`nๆ็ฑๅ่นๆๅๅๅ","c:red","dropshadow:(h:50px v:50px b:5px c:Black o:50% s:10px)")
tr.render()
Sleep, 3000
ExitApp
#Include TextRender.ahk
Precondition
Use with Programs that require fullscreen.
Happened with several VNC clients, an openGL game. Never happened when only staying in Windowed mode.
Does also happen with AutoHotKey's standalone ToolTips.
How to reproduce (sometimes)
tr := TextRender("Sample text", "time:1000")
and then alt tabbing to a application that runs in exclusive fullscreen mode.Question Does this have todo with framebuffer perhaps? Does the text really gets cleared up?
It's strange that it 'reloads' every time, if it happens, after an context change.
Hardware: Lenovo T490 with intel iGPU
Windows 10,
Additional info
Sometimes the displayed Text gets "stuck" even without being in fullscreen mode.
Textrender info
; Date: 2021-05-22
; Version: v1.06
Hi! I use your script to show a fullscreen message on second monitor, now I have set a variable in ini file to set the font size. But if I use a pt size, after few character there is no more space and can't see correctly all message. If I use precentage have less character to see.
There is a way to auto adapt font size/percentage based on text and sizeof the background?
For example something like if the text is "lorem ipsum dolor is amet" can be max 150px and if the text is "Lorem" can be max 500px because is shorter than the first phrase. Thank you!
this is the code I'm using now: TextVar.Value, "c: #00000099 x:1920 y:y w:100% h:100% t:10000 m:0 a:0", "f:(Blogger Sans) z:(Blogger Sans Condensed) c: #ffffff s:" FontSize " j:2 v:2"
tr:=TextRenderDesktop("testtest") ; show nothing on desktop.
tr:=TextRenderWallpaper("testtest") ; work fine.
Sleep, 3000
ExitApp
#Include TextRender.ahk
the text style param Justify and vertical uses 0-2.
would it be better to use 1-3 ?
because ahk uses 1 as the base point.
tr := new TextRender
tr.draw("hello world!`nๆ็ฑๅ่นๆๅๅๅ")
tr.Flush()
Sleep, 3000
ExitApp
#Include TextRender.ahk
when i click the message box. it shows nothing.
it seems to be the same as tr.clear()
tr := new TextRender
tr.draw("hello world!`nๆ็ฑๅ่นๆๅๅๅ")
tr.render()
MsgBox
tr.Sleep(1000)
Sleep, 3000
ExitApp
#Include TextRender.ahk
it only show text, no backgroud.
tr := new TextRender
tr.draw("hello world!`nๆ็ฑๅ่นๆๅๅๅ",,"x:20")
tr.render()
Sleep, 3000
ExitApp
#Include TextRender.ahk
CoSetThreadDpiAwarenessContext function is in Windows 8.1 or higher version of the operating system, the introduction of doesn't support Windows 7.
I have double screen, but in another screen, the position may wrong!
I created a github account just to tell you that. I looked for a way to message you, perhaps I need a certain amount of activity to unlock that.
Anyways, I've seen countless posts/replies of your's around the autohotkey forums (reddit aswell I believe). You deserve many thanks before you even take into account the fantastic projects you've published. Vis2 is still the only tesseract ahk library, to my knowledge, that doesn't require using an executable w/gui or running commands through a command line exe. Textrender is obviously great, which I'm also using for business applications (no money for me, family business, even though the license would allow). A small but most recent example, I needed a way to alert technicians if a packaging robot had orders waiting to pick up, but didn't want the screen occluded by a listview of sql records. So now there is a small circle on the screen, that they can move. It turns green when robots empty, orange when orders to pick up. If they click or hit CTRL-M, the individual orders show up for them to browse. Not the coolest one, but way better than message boxes stealing focus!
Anyways, I saw your discussion reply where you said ahk v2 gui wasn't implemented yet due to lack of library users. I'm still using v1 anyways, for now, but thought you might need reminded you're talented and appreciated!
Thanks for your efforts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.