347 questions
0
votes
0
answers
90
views
How to fix IndoPak Arabic font overlapping (Kasra below letters) in React Native Quran app?
I am building a Quran app in React Native and using an IndoPak Nastaleeq font (ttf) to render Arabic text.
The problem is that some diacritics (especially Kasra ِ U+0650) are overlapping with letters ...
0
votes
0
answers
105
views
Text rasterisation using D2D/DWrite: glyph path bounds calculation
I'm trying to rasterise text in a specified font into an image to be written to a file; this is part of typeface testing, so layout, line breaks, etc. do not matter, but OpenType features like ...
1
vote
0
answers
36
views
How can I overlay anti-aliased styled text on a Bitmap using Canvas in Android?
I'm building an Android app where I need to overlay styled text on images using Canvas and Paint. I’ve successfully drawn basic text, but I'm running into two main issues:
Text appears jagged or ...
0
votes
0
answers
70
views
Rendering a scaled text on same code, same Chrome, same laptop and same monitor resolution differs when an external monitor is connected
I have this small codepen: https://codepen.io/Ardeshir81/pen/Byoapav
This is the code snippet:
<style>
.root { transform-origin: top left; scale: 20 }
span {
background:red; position:...
1
vote
1
answer
88
views
Text is rendered differently (shifted/scaled horizontally and vertically) on Safari vs. Chrome
Take a look at this codepen: https://codepen.io/Ardeshir81/pen/EaVYXJp
* {
font-family: "Audiowide";
font-weight: 900;
}
.root {
transform-origin: top left;
scale: 15
}
span {
background: ...
1
vote
2
answers
93
views
Blank space when creating a custom text rendering composable
I was trying to create custom text rendering composable using the the Canvas composable. However, I don't understand how TextMeasurer is calculating the final height of the composable.
Here is a ...
0
votes
1
answer
100
views
Handling DrawGlyphRun missing characters in WPF
I am using drawingContext.DrawGlyphRun in my scenario, as I need the best performance I can get as I am rendering a large amount of text at lots of different positions on screen.
However, I have come ...
0
votes
0
answers
56
views
Why is Canvas text thicker than SVG text with the same font size and font family? [duplicate]
I noticed that if I draw the text with the same font size and font family, the text on canvas is thicker than the text on SVG. Does anyone know what causes this and if it can be fixed? Is it possible ...
1
vote
0
answers
197
views
Incorrect vertical glyph alignment(bearing y) with HarfBuzz
I want to render the text as this:
But this is what I got:
here's the full code but for the sake of conciseness I also wrote a small demo in c:
#include "freetype2/ft2build.h"
#include &...
0
votes
0
answers
98
views
What is the best way to adjust the line spacing for text added to an image using R?
I'm currently working on a simple R script in RStudio that generates text-based images. I've almost completed the script and would like to share it with you. Here's my code so far...
# Check if ...
1
vote
1
answer
166
views
karaoke text rendering effect in my code is slow
I want the effect to run immediately when I call the function, but when I call the function I have to wait 3-4 seconds for the effect to work.
I use canvas in HTML
const canvas = document....
0
votes
0
answers
41
views
C++ SDL2 Text Renderer with the error: access violation reading location
I'm currently trying to create a game in C++17 with SDL2 (and SDL_ttf). When I'm trying to initialize the text renderer, I'm getting an error that says: "Exception thrown at 0x00007FFFB5A19116 (...
1
vote
0
answers
94
views
Is it valid in Harfbuzz to specify repeating cluster IDs in the unicode input?
I'm writing code which needs to find the advances for each grapheme in the original text (e.g., for cursor positioning and selection), and I would like to use the Unicode grapheme boundaries rather ...
2
votes
0
answers
58
views
How to use math sympy symbols in aiogram?
How can I use sympy’s symbols in my aiogram telegram bot’s answers like Jupiter notebook does?
For example this code:
from sympy import Symbol, Eq, sqrt
h = Symbol('h')
a = Symbol('a')
AB = sqrt(h**...
1
vote
0
answers
110
views
Trouble with mustache-sharp multiplying empty lines
I have this template in mustache-sharp:
Good Day,
{{#newline}}
The following asset has been retired by {{Actor}}:
{{#newline}}
{{AssetNumber}}: {{AssetDescription}}
Date retirement: {{DateRetired:dd....
6
votes
1
answer
606
views
Flutter/Dart: Changing colors of specific unicode characters in a string
I'm new to Flutter, trying a code to change the color of specific Unicode characters in a string. Color coding \u0951, \u0952, and \u1cda to say blue, red and green. The output string is not matching ...
-1
votes
1
answer
472
views
How to display data in a tabular format using gocui in Golang?
I'm working on a Go project using the gocui library for creating a terminal-based user interface. I have a list of results that I want to display in a tabular format with multiple columns. However, I'...
0
votes
0
answers
118
views
Using php imagettftext with Wingdings font results in only boxes being displayed
In my php application I am using imagettftext() successfully with several font including OCR-A and others, but when I use wingding.ttf as the font I only get squares (character not found) as the ...
1
vote
0
answers
154
views
OpenGL text rendering is flipped vertically
I am trying to render some text with OpenGL using a font atlas texture from this generator. The settings I used were Open Sans, font size 32, with transparent background and font color #000. My code, ...
2
votes
0
answers
1k
views
Using Markdown, in React, to render the output of a JSON API
I'm trying to use Markdown to render the output of a Json API, in the chat conversation of this GitHub project: https://github.com/doingthisalright/chatgpt-langchain-qna-on-your-docs
But I can't make ...
0
votes
1
answer
72
views
How to Color-code Manchu/Mongolian Script on Webpage?
My odyssey started from a rather simple task. I had a Manchu word in the traditional script and I wanted to change all the vowels in the word (ignoring ligatures) to a different color
<p>ᠠᠮᠪᡠᠯᠠ ...
0
votes
1
answer
473
views
QML Text sometimes skips rendering some characters
I have an application where I display the time on the screen. It works well except very rarely it sometimes does not render the time fully and skips rendering a number. For example if time is "11:...
3
votes
1
answer
586
views
I want to display urdu text on image using python
from PIL import Image, ImageFont, ImageDraw
from matplotlib import pyplot as plt
import numpy as np
import cv2
text_string = u'تصوير'
img = Image.new('RGB', (200, 150))
draw = ImageDraw.Draw(img)
...
2
votes
0
answers
118
views
Chrome text render bug
Examples of text glitch :
If hover on element the glitch is fade out.
I tried all value of -webkit-font-smoothing and text-rendering stop on this one
-webkit-font-smoothing: subpixel-antialiased;
text-...
2
votes
1
answer
414
views
Isn't a quad always composed of 4 vertex?
I'm getting into OpenGL. I'm following learnopengl.com and I reached the text rendering part, where I read (at the end of In Practice > Text Rendering > Shaders section)
The 2D quad requires 6 ...
0
votes
1
answer
139
views
How to measure a text element in matplotlib
I need to lay out a table full of text boxes using matplotlib. It should be obvious how to do this: create a gridspec for the table members, fill in each element of the grid, take the maximum heights ...
0
votes
1
answer
626
views
When I render my user input from a textarea in react, all of the formatting (line-breaks and tabs) are automatically removed, how do I change that?
How my text appears when rendered
How my text appears in the textarea input
I am posting multi-paragraph blogs, some about poetry (where line breaks and spacings matter a lot). How do I make the line ...
2
votes
0
answers
762
views
How to make `node-canvas` render pixel perfect fonts like Windows did in the 00s?
I'm writing a canvas-based app which is being shown on low resolution LED matrix RGB panels. It runs in Node JS and sends RGBA image bytes to a socket of a receiver.
Because of the low resolution, I ...
0
votes
1
answer
221
views
How to change a font in a PDF, a single glyph renders wrong (PDF created using Adobe Acrobat Pro XI, with text recognition "clear scan")
I have a document that was created from a scanned document, after using the Acrobat XI pro's text recognition tool, with parameters language: Spanish; PDF output: clear scan; downsample to 600 dpi.
It ...
1
vote
1
answer
586
views
Rendering justified text - I cannot get the words to align by baseline
I am using the ImageSharp library to render multiple lines of text, and I want each line to be justified. I want the spacing to be dynamically calculated to ensure the first character is left aligned ...
0
votes
1
answer
700
views
SDL_RenderCopy-ing to another texture results in subtly darker image
I've been chasing this visual bug for a while, and I've concluded that the process of renderCopying from one texture to another results in a slightly darkened image.
#include "basics.h"
#...
0
votes
1
answer
143
views
Assuming my json file is in a server, how do I filter using component did mount in a class setting
How do I filter my componentDidMount data without it throwing an error, filter is not supported in componentDidMount
this is my code currently :
componentDidMount() { //fetch data from json server
...
1
vote
1
answer
281
views
What basic primitives my render engine needs to support for drawing OTF fonts?
I am writing my own render engine for a very specific use case and I need to be able to draw a text. At first, I thought that it would be easier to create my own font file where I would by hand define ...
-1
votes
1
answer
1k
views
Center text coordinates on screen in C++
I'm working on an application that shows text on screen using GLEW and FreeType libraries. I want to center the text on the screen. The problem is, I don't know how to calculate the y coordinates of ...
2
votes
1
answer
160
views
Why the width of the opengl viewport I set is smaller and the reading pixels are not aligned?
code show as below(use the demo from enter link description here)to render glyph
Luint rbcolor;
glGenRenderbuffers(1, &rbcolor);
glBindRenderbuffer(GL_RENDERBUFFER, rbcolor);
...
2
votes
1
answer
490
views
Rusttype how to position glyphs vertically
I'm trying to use the rusttype crate to render text. So far it's been fantastic, but I am running into a wall when trying to correctly position individual glyphs.
I am rendering text by rendering each ...
7
votes
0
answers
753
views
How to draw text faster than QPainter.drawText in Qt Widgets?
I'm implementing a custom text layouting engine and I need a simple text output function that would function similar to WinAPI's TabbedTextOut. That is, it shouldn't wrap words or anything like that.
...
0
votes
0
answers
78
views
Css scale make some fonts resize strangely with missing parts of glyhs/characters
I'm doing a webapp for an epub viewer. In that viewer, one of the feature is to zoom the page so the reader can read the text better.
What I'm doing now is create a scaleContainer div (or just the ...
0
votes
1
answer
347
views
Eclipse IDE doesn't show window-titles properly
When I open the Eclipse IDE the window titles don't show text properly, not all but most texts related to the IDE are jagged and glitchy, anyone knows what might be the issue?
Things I have tried:
...
0
votes
0
answers
207
views
How to render mathematical on PDF documents
I am trying to render mathematical expressions to a PDF document using a low-level library such as libharu or pdflib; I am having problem rendering several special signs, such as radical signs.
A ...
1
vote
1
answer
121
views
Pygame Text Doesn't Display
def score():
global x_score, o_score
scoreFont = pygame.font.SysFont('Comic Sans', 20, bold=True)
SCORE = scoreFont.render(f'X {x_score} : {o_score} O', True, (0, 0, 0))
...
-1
votes
2
answers
320
views
Change the content of the text while the Game is running - Python Arcade 2.4.3
I'm looking for a way to change the rendered text while the game is running.
I found someone who says that simply change the text variable would work.
So I try this:
import arcade
WINDOW = {"...
1
vote
1
answer
426
views
Generating Text out of curves and lines
I am working on a project in which i use a library to export geometry as IGES. This library only allows me to export lines. I want to create labels for my export by rendering some text next to it. For ...
0
votes
1
answer
3k
views
What does TextDirection really do in Flutter
What difference does using TextDirection make. It's required all over the place in Flutter but the purpose isn't clear.
For example, given the following code:
const text = 'Hello';
final textSpan = ...
1
vote
1
answer
727
views
What is TextAffinity in Flutter?
The TextAffinity enum in Flutter has the following documentation description:
A way to disambiguate a TextPosition when its offset could match two
different locations in the rendered string.
For ...
0
votes
1
answer
229
views
CTFramesetterSuggestFrameSizeWithConstraints line breaks even when there is space available on the same line
We are trying to get the suggested frame size using the Core Text API CTFramesetterSuggestFrameSizeWithConstraints.
Let, E = \uFFFC ; W = \u200B ; S = \u00A0
The CTFrameSetter is created with the ...
1
vote
1
answer
242
views
What does Paragraph.getBoxesForRange actually get in Flutter
The Paragraph class in Flutter has a method called getBoxesForRange.
The documentation says:
Returns a list of text boxes that enclose the given text range.
However, it's not clear to me if the ...
0
votes
2
answers
102
views
php adding blank spaces to mysql result with concat_ws
I have the following dates set and query:
create table test (
id int unsigned not null auto_increment primary key,
street1 varchar(32) not null default '',
street2 varchar(32) not null default '...
4
votes
1
answer
1k
views
Text overflow ellipsis adds unknown character at the end
I use custom font Inter for my Flutter Web project. And in all Text widgets with ellipsis I got unknown symbol at the end of text. When font changed to Roboto problem disappears. What the symbol ...
0
votes
1
answer
697
views
Render antialiased text using TextRenderer C#
I wrote a program to draw some string on an image. I use graphics.DrawString() but as you can see in this post, it has some problems.
TextRenderer.DrawText() solved that problem but the rendered text ...