TrueType Font using C

This is a discussion on TrueType Font using C within the C Programming forums, part of the General Programming Boards category; Hi All, I want to display unicode data using TrueType and OpenType Font using C code. Kindly suggest me if ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    1

    Red face TrueType Font using C

    Hi All,

    I want to display unicode data using TrueType and OpenType Font using C code. Kindly suggest me if i can download C code for this purpose from any where or how i can do this

    Kind Regards,
    Tanveer

  2. #2
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    398
    In what median are you wanting to display it? OS information would be relevant.

  3. #3
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Just to expand a bit on carrotcake's answer:

    If you are just wanting to draw fonts, using the current OS's existing methods, then it's probably quite easy. Drawing fonts from outline data (which those fonts are) is definitely non-trivial. There is code included in various open-source projects (X-windows would be one place to have a look), but it is not what you'd call "easy reading" code. It is certainly several thousand lines of code, including a fair bit of it that require that you understand how those types of fonts are stored and how to decode that into a glyph that can be drawn onto the screen.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  4. #4
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    Here you go, something I whipped up in C a while ago... based on a C++ implementation. http://code.google.com/p/harw/source...rc/util/font.c

    It doesn't do unicode (nor is it pretty), but you do have to do some work.
    Last edited by zacs7; 01-20-2009 at 02:24 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. DirectX | Drawing text
    By gavra in forum Game Programming
    Replies: 4
    Last Post: 06-08-2009, 12:23 AM
  2. problem with my font manager
    By hannibar in forum C Programming
    Replies: 1
    Last Post: 03-07-2006, 07:03 AM
  3. destroywindow() problem
    By algi in forum Windows Programming
    Replies: 6
    Last Post: 03-27-2005, 10:40 PM
  4. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 09:18 PM
  5. How to install TrueType font .ttf
    By MickeyMouse in forum Windows Programming
    Replies: 4
    Last Post: 07-01-2003, 06:28 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21