Click here to Skip to main content
15,881,204 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: WSO CCC OTD 2021-04-22 - winner Pin
pkfox21-Apr-21 23:44
professionalpkfox21-Apr-21 23:44 
GeneralRe: WSO CCC OTD 2021-04-22 - winner Pin
Chris C-B22-Apr-21 2:32
Chris C-B22-Apr-21 2:32 
GeneralRe: WSO CCC OTD 2021-04-22 - derivation Pin
jsc4222-Apr-21 3:15
professionaljsc4222-Apr-21 3:15 
GeneralRe: WSO CCC OTD 2021-04-22 - derivation Pin
Chris C-B22-Apr-21 3:52
Chris C-B22-Apr-21 3:52 
GeneralRe: WSO CCC OTD 2021-04-22 - derivation Pin
pkfox22-Apr-21 10:37
professionalpkfox22-Apr-21 10:37 
GeneralRe: WSO CCC OTD 2021-04-22 - derivation Pin
yacCarsten22-Apr-21 11:24
yacCarsten22-Apr-21 11:24 
GeneralRe: WSO CCC OTD 2021-04-22 - derivation Pin
yacCarsten22-Apr-21 11:13
yacCarsten22-Apr-21 11:13 
RantOh come on Microsoft! Pin
honey the codewitch21-Apr-21 15:39
mvahoney the codewitch21-Apr-21 15:39 
My little graphics library needs to do text, and I thought "hey, I'll whip up a C# app to rasterize monospaced fonts to a monochrome bitmap."

Just add a reference to System.Drawing to a console app, and then create a Bitmap and draw to it right?

Wrong.

Even after you set all of the text rendering hints, and even using GraphicsPath.AddString() for more accuracy, you cannot turn off the padding around the fonts, nor get the font to a pixel perfect height at all sizes.

The thing is, the GDI+ code underneath is perfectly capable of doing this. They just didn't expose it.

The alternative is reinventing the entire elephanting wheel and rasterizing the fonts myself.

I found an open source project (under Apache license unfortunately) that I can use to build my tool. Fortunately that tool isn't part of my GFX package itself - it's just a utility to make files that the GFX code can read.

But this shouldn't be necessary. They actually have to parse the TTFs and draw them manually. Dead | X|
Real programmers use butterflies

GeneralRe: Oh come on Microsoft! Pin
Rick York21-Apr-21 15:54
mveRick York21-Apr-21 15:54 
GeneralRe: Oh come on Microsoft! Pin
honey the codewitch21-Apr-21 16:08
mvahoney the codewitch21-Apr-21 16:08 
GeneralRe: Oh come on Microsoft! Pin
Rick York22-Apr-21 5:34
mveRick York22-Apr-21 5:34 
GeneralRe: Oh come on Microsoft! Pin
honey the codewitch22-Apr-21 5:37
mvahoney the codewitch22-Apr-21 5:37 
GeneralRe: Oh come on Microsoft! Pin
Rick York22-Apr-21 10:04
mveRick York22-Apr-21 10:04 
GeneralRe: Oh come on Microsoft! Pin
CPallini21-Apr-21 20:23
mveCPallini21-Apr-21 20:23 
GeneralRe: Oh come on Microsoft! Pin
honey the codewitch22-Apr-21 5:46
mvahoney the codewitch22-Apr-21 5:46 
GeneralRe: Oh come on Microsoft! Pin
Storm-blade22-Apr-21 2:27
professionalStorm-blade22-Apr-21 2:27 
GeneralRe: Oh come on Microsoft! Pin
honey the codewitch22-Apr-21 4:17
mvahoney the codewitch22-Apr-21 4:17 
GeneralRe: Oh come on Microsoft! Pin
Gary R. Wheeler22-Apr-21 13:58
Gary R. Wheeler22-Apr-21 13:58 
GeneralRe: Oh come on Microsoft! Pin
honey the codewitch22-Apr-21 15:20
mvahoney the codewitch22-Apr-21 15:20 
GeneralRe: Oh come on Microsoft! Pin
Gary R. Wheeler23-Apr-21 6:04
Gary R. Wheeler23-Apr-21 6:04 
GeneralRe: Oh come on Microsoft! Pin
BillWoodruff23-Apr-21 3:01
professionalBillWoodruff23-Apr-21 3:01 
GeneralRe: Oh come on Microsoft! Pin
honey the codewitch23-Apr-21 3:14
mvahoney the codewitch23-Apr-21 3:14 
QuestionAttention entomologists Pin
David Crow21-Apr-21 14:45
David Crow21-Apr-21 14:45 
AnswerRe: Attention entomologists Pin
Greg Utas21-Apr-21 15:52
professionalGreg Utas21-Apr-21 15:52 
AnswerRe: Attention entomologists Pin
Sander Rossel21-Apr-21 18:35
professionalSander Rossel21-Apr-21 18:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.