Hinting makes text looks like zalgo.
See original GitHub issueDescription
I’m evaluating your library for my project. But when i tried to turn hinting on - text got broken:
Without hinting it’s looks like this:
Steps to Reproduce
public static void Main(string[] args)
{
var fonts = new FontCollection();
FontFamily font = fonts.Add(@"Fonts\OpenSans-Regular.ttf");
using var img = new Image<Rgba32>(1024, 800);
img.Mutate(x => x.Fill(Color.White));
var str = "The quick brown fox jumps over the lazy dog. 0123456789";
var off_y = 0f;
for (int size = 5; size < 64; size++)
{
RenderText(font.CreateFont(size), str, img, off_y += size + 1);
}
using FileStream fs = File.Create("_six" + ".png");
img.SaveAsPng(fs);
}
public static void RenderText(Font font, string text, Image<Rgba32> img, float y)
{
string path = IOPath.GetInvalidFileNameChars().Aggregate(text, (x, c) => x.Replace($"{c}", "-"));
string fullPath = IOPath.GetFullPath(IOPath.Combine("Output", IOPath.Combine(path)));
IPathCollection shapes = TextBuilder.GenerateGlyphs(text, new TextOptions(font)
{
Origin = new Vector2(50f, y),
});
img.Mutate(x => x.Fill(Color.Black, shapes));
}
System Configuration
- Fonts version: 1.0.0-beta18
- Other Six Labors packages and versions: SixLabors.ImageSharp.Drawing 1.0.0-beta14.8
- Environment (Operating system, version and so on): Win10
- .NET Framework version: netcore sdk 3.1.421
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Zalgo Text Generator - Create Glitchy Text Online
Zalgo Text Generator is a free tool to convert your text into glitch text. However, the Zalgo text is a glitchy form of...
Read more >How does Zalgo text work?
Zalgo text works because of combining characters. These are special characters that allow to modify character that comes before. enter image ...
Read more >Zalgo Text Generator
This is the zalgo text generator. It allows you to convert normal text into zalgo text which you can then copy and paste....
Read more >Zalgo Text Generator ➜ #1 😍 Z͉̾á̘͉̉l͈̯̾̀g̥̤͌̈ó͎̥͡ ...
Zalgo Text Generator is the most popular online free tool to generate unlimited Glitch Fonts & Weird Text from normal text for Instagram...
Read more >Zalgo text causes Netty to throw an exception · Issue #2474
If I paste some zalgo text into a form input and submit the form, Netty throws an exception and the page is completely...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It was this one: https://github.com/SixLabors/Fonts/blob/v1.0.0-beta18/tests/SixLabors.Fonts.Tests/Fonts/OpenSans-Regular.ttf
We did checkout repo at
1.0.0-beta18
tag, and made our own example.Fixed with #295