GithubHelp home page GithubHelp logo

iseahound / textrender Goto Github PK

View Code? Open in Web Editor NEW
45.0 45.0 9.0 1.71 MB

Simple and minimalistic graphics engine for displaying text on screen. Supports AutoHotkey v1 and v2.

License: MIT License

AutoHotkey 100.00%
desktop-app graphics-engine user-interface ux-design

textrender's Introduction

Hi there ๐Ÿ‘‹

textrender's People

Contributors

iseahound avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

textrender's Issues

the backgroud will miss when use dropshadow.

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

Overlay does re-launch when in new Window Context

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)

  1. Display some text via tr := TextRender("Sample text", "time:1000") and then alt tabbing to a application that runs in exclusive fullscreen mode.
  2. Wait some time, alt tab again to the fullscreen application
    Effect
    The sample text is shown each time I enter the fullscreen application for the specified timeframe

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

How to auto set font size based on background size

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"

color:Delete or color:Erase seems wrong.

tr := new TextRender
tr.draw("hello world!`nๆˆ‘็ˆฑๅƒ่‹นๆžœๅ“ˆๅ“ˆๅ“ˆ","c:red","color:Delete")
tr.render()

Sleep, 3000
ExitApp

#Include TextRender.ahk

1

i don't understand tr.Sleep()

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

if i set x in text style,the backgroud will miss.

it only show text, no backgroud.

tr := new TextRender
tr.draw("hello world!`nๆˆ‘็ˆฑๅƒ่‹นๆžœๅ“ˆๅ“ˆๅ“ˆ",,"x:20")
tr.render()

Sleep, 3000
ExitApp

#Include TextRender.ahk

SetThreadDpiAwarenessContext in win7

CoSetThreadDpiAwarenessContext function is in Windows 8.1 or higher version of the operating system, the introduction of doesn't support Windows 7.

How to assign opacity?

Using this here

tr.Render("Off", {x: A_ScreenWidth-Width_Offset, y: A_ScreenHeight-Height_Offset, color: "Red"})

image

It displays correctly what I want it to, but is there a way to change the opacity of the red? I tried using cRRGGBBAA format, but to no avail.

Thought you should know you're fantastic!

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.