|
From: <doc...@us...> - 2008-03-31 20:40:43
|
Revision: 219
http://openpcl.svn.sourceforge.net/openpcl/?rev=219&view=rev
Author: documentsystems
Date: 2008-03-31 13:39:54 -0700 (Mon, 31 Mar 2008)
Log Message:
-----------
Change horizontal positioning to be based on float values rather than int. Turn off default bolding of fixed-width text.
Modified Paths:
--------------
openpcl/src/com/openpcl/pclrenderimage/render/PriFonts.java
Modified: openpcl/src/com/openpcl/pclrenderimage/render/PriFonts.java
===================================================================
--- openpcl/src/com/openpcl/pclrenderimage/render/PriFonts.java 2008-03-31 20:38:11 UTC (rev 218)
+++ openpcl/src/com/openpcl/pclrenderimage/render/PriFonts.java 2008-03-31 20:39:54 UTC (rev 219)
@@ -32,10 +32,10 @@
protected ArrayList<int[]> mCharWidthArrayList = null;
// For mono fonts, number of characters per inch = (s#H
- protected int mCurrentHorizontalPitch = 10;
+ protected float mCurrentHorizontalPitch = 10;
// For mono fonts not proportional fonts, (cpi = 120 / HMI). = &k#H
- protected int mCurrentHorizontalMotionIndexHMI = 12;
+ protected float mCurrentHorizontalMotionIndexHMI = 12;
protected int mCurrentFontStylePlanBoldItalic = Font.PLAIN;
protected float mCurrentFontHeight = 12;
@@ -170,7 +170,7 @@
public FontRenderContext getFontRenderContext() { return mFontRenderContext; }
public int getCurrentFontStylePlanBoldItalic() { return mCurrentFontStylePlanBoldItalic; }
public boolean getIsMonospacedFont() { return mCurrentJavaBuiltInFont == sFontIsMonospaced; }
- public int getCurrentHorizontalPitch() { return mCurrentHorizontalPitch; }
+ public float getCurrentHorizontalPitch() { return mCurrentHorizontalPitch; }
/** Get the adjusted pixel width of the character in the current font by using the internal printer font
* character width tables.
@@ -183,7 +183,7 @@
if (mCurrentJavaBuiltInFont == sFontIsMonospaced) {
// To see how HMI works, see the comment block in setHorizontalMotionIndexHMI()
- int charsPerInchUsingHMI = 120 / mCurrentHorizontalMotionIndexHMI;
+ float charsPerInchUsingHMI = 120 / mCurrentHorizontalMotionIndexHMI;
// Mono font is selected. Use the current setting for "(dots per inch) / (chars per inch using HMI)"
tNumWidthPixels = Math.round((float)PriPageSettings.sPrintDotsPerInch / (float)charsPerInchUsingHMI);
} else {
@@ -453,7 +453,7 @@
*
* @param pHmiValue
*/
- public void setHorizontalMotionIndexHMI(int pHmiValue) {
+ public void setHorizontalMotionIndexHMI(float pHmiValue) {
mCurrentHorizontalMotionIndexHMI = pHmiValue;
mCurrentHorizontalPitch = (120 / mCurrentHorizontalMotionIndexHMI);
// PriDebug.infoln(PriDebug.spacesForPclParseMsgs +
@@ -532,7 +532,7 @@
switch (mCurrentJavaBuiltInFont) {
case sFontIsMonospaced:
- makeTextBeBold |= Font.BOLD;
+ // makeTextBeBold |= Font.BOLD;
setMonospacedJavaBuiltInFont(makeTextBeBold, zoomFontHeight);
break;
case sFontIsSansSerif:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|