non true type

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • a_man

    #1

    non true type

    hello everyone

    I need to print with the e.graphics.draw string method.
    And it takes among other a font object as argument.
    But I want to use a font which is not a true type. Therefore im stuck
    right now.
    How do I print using a font that is not a true type font and actually
    is hardware resident

    Thank you in advance
    Amir

  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: non true type

    Amir,

    How would you do it normally? If you have a way to get a handle to the
    font programatically (you must, otherwise, the abstracted graphics routines
    would have NO clue how to render this) then you can pass it anywhere you
    want.

    Can you get a handle to it? Is there an API that does this?

    Also, how is it hardware resident? Are you saying that the font is on
    the printer itself? That makes little sense to me.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "a_man" <amirrahmani200 4@yahoo.dk> wrote in message
    news:1136299778 .579697.28660@g 49g2000cwa.goog legroups.com...[color=blue]
    > hello everyone
    >
    > I need to print with the e.graphics.draw string method.
    > And it takes among other a font object as argument.
    > But I want to use a font which is not a true type. Therefore im stuck
    > right now.
    > How do I print using a font that is not a true type font and actually
    > is hardware resident
    >
    > Thank you in advance
    > Amir
    >[/color]


    Comment

    • a_man

      #3
      Re: non true type

      Hello Nicholas

      Im using an api, which uses some methods that call some unmanaged
      functions.
      Right now I´m home and I dont have the code here, but I will post it
      tomorrow from work.
      But for now: One of these methods returns a LOGFONT struct thing.
      and this LOGFONT has all the information, like font name, size and so
      on.
      Then I try this
      Font f=Font.FromLogF ont(the logfont struct that my api method returns)

      Then i get the error message saying that the font is not a true type and
      therefor not supported and thereby I have no chance to pass the font to
      the graphics.drawst ring method.

      And about the hardware-resident fonts. Yeah I actually believe that the
      fonts are only availabe on the printer it self. Its a label printer.

      Like when i choose it as defaultprinter and then open microsoft word,
      I see the true type font marked as TT and I see some other fonts marked
      with an o and then the printers own font marked with a printer
      picture.Some of these fonts are Code 39, EAN 8 , EAN 13 and so.
      My employer wants me to use these fonts for general purposes.

      In vb6.0 its easy to get hold of these fonts by using printer.Fonts
      but its not so straightforward in .net.
      it think its impossible since the .netplatform does not support fonts
      that are not true types.

      Dear Nicholas I would be thankfull for your further reply

      Thank you in advance
      Amir

      --
      Sent via .NET Newsgroups

      Comment

      Working...