New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I use wider area while text rendering process? #22
Comments
The only information available to the text renderer is the original text line positions, so if the original text is vertical and translated text is horizontal the rendered text will be too narrow.
|
thanks for notifying me! |
I has wrote a modification in the past year to this tool, that used the inpainting image to search the limit of the solid background color in the bubble and with that I was able to expand the text render area in a better way, well, I never pushed because I did in C# and called from python, isn't good for the project the way that I did it. |
Here, I did with this code: https://gist.github.com/marcussacana/2e6bfa87ebb1a6b11eb41708125aba7d import clr
clr.AddReference("TextDraw")
from TextDraw import GDI
GDI.DrawText('./result/render.png', trans_text, region.x, region.y, region.w, region.h, (255 << 24)|(region.fg_r << 16)|(region.fg_g << 8)|region.fg_b) |
I had a little trouble rewriting it on the new version but it gave me more readable results even if I think it's mostly the way the text is rendered that changes. |
Only debugging then, maybe a bug, because I remember well that thing as one of the worst part writing that code. |
Ohh, during the call you set the argument |
Because it is awkward that reading text vertically, I modified text_render.py to always render text horizontally.
But since original text area is too narrow, this result is still hard to read.
So, I want to know it is possible to modify code to use more wider area while text rendering process.(and how to)
Sorry for my poor English and thanks in advance.
The text was updated successfully, but these errors were encountered: