Announcement

Collapse
No announcement yet.

Convert font to its vector representation...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dominic Mitchell
    replied
    The short answer is yes.
    Code:
    hFontOld = SelectObject(hDC, hFont)
    
    ' Do stuff here
    
    SelectObject hDC, hFontOld
    
    ' hDC = screen|memory|printer device context

    Leave a comment:


  • C.M. Rouleau
    replied
    Hmmm...GetGlyphOutline...right there under my nose in the windows API. Now I suppose it's just a matter of learning to select a TrueType font into a specified device context, and then I *might* be of and running. Is selecting a font into a device context similar to selecting a bitmap into a device context?

    -CMR

    Leave a comment:


  • Dominic Mitchell
    replied
    I remember using GetGlyphOutline many years ago to do what you are after.

    Leave a comment:


  • Brad D Byrne
    replied
    http://developer.apple.com/textfonts...Man/index.html

    http://www.truetype-typography.com/ttoutln.htm

    http://www.truetype-typography.com/

    Leave a comment:


  • Brad D Byrne
    replied
    ok, there are some good web pages out there, I'll try to find, and the best book I've found for details is,

    Windows Graphics Programming: Win32 GDI and DirectDraw

    http://www.fengyuan.com/

    Leave a comment:


  • C.M. Rouleau
    replied
    Brad,

    Perhaps I posed my question incorrectly, but I'm certainly not suggesting I want to reinvent the wheel. Instead, given a truetype font, for instance, what I'm asking is how might one get at its outline - i.e., the lines and curves that make of the font perimeter in the first place.

    -CMR

    Leave a comment:


  • Brad D Byrne
    replied
    CM,

    I looked into fonts fairly intently 3 yrs ago, I wanted to see if I could use the technology to create a custom scalable font for displaying antialiased drawings for the web, I quickly realized how much work had already been done with the truetype formats, I suggest "why reinvent the wheel"?, I doubt anyone could improve on the algo's much reguardless of how many hours were thrown at it

    B

    Leave a comment:


  • C.M. Rouleau
    started a topic Convert font to its vector representation...

    Convert font to its vector representation...

    Hello,

    I'm very close to finishing a dxf to g-code converter, and was wondering if it might be possible to include text in the conversion as well. I suppose one could do the conversion in the cad app itself, but it seems much more elegant to have my app do it. I suppose the key is to get at the vector representation of a particular font, but I'm sure this is no easy feat. I've taken a look at the FreeType library, but boy, it's seems there's huge mountain to climb there in terms of what functions are really required to do what I want. Anyone have any advise on FreeType or another way of attacking the problem?

    -CMR
Working...
X