Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Print plain text with Printable interface

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I�m trying to implement an printing component
to use with an simple Java application, and i�m having problems with the fonts.
The kind of printing is text plain, thus i must use an font that has fixed dimensions ( all characters with the same width and height ) to make the line breaking easer.
I�ve just use the Courier text plain Font object, but it does not work ( the width is variable ).
I�d like to know if is there some method to print text plain ( not using an Graphic context just like in Printable interface, maybe getting an stream to printer... ), or to get an
fixed dimension font object to use with Printable.
Thanks in advance.
Claudio Gualberto.
 
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
isn't there the font "monospaced"?
Chantal
 
Those are the largest trousers in the world! Especially when next to this ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic