templates support
This commit is contained in:
@@ -486,8 +486,8 @@ public class HtmlPrinter : IEpsonPrinter
|
||||
var (baseWidth, baseHeight) = FontSizes[_currentFont];
|
||||
|
||||
// Apply multipliers
|
||||
int effectiveWidthMultiplier = _fontWidthMultiplier;
|
||||
int effectiveHeightMultiplier = _fontHeightMultiplier;
|
||||
float effectiveWidthMultiplier = _fontWidthMultiplier;
|
||||
float effectiveHeightMultiplier = _fontHeightMultiplier;
|
||||
|
||||
if (_isQuadrupleMode)
|
||||
{
|
||||
@@ -497,21 +497,21 @@ public class HtmlPrinter : IEpsonPrinter
|
||||
|
||||
if (_isBiggerFontWidthTM220)
|
||||
{
|
||||
effectiveWidthMultiplier *= 2;
|
||||
effectiveWidthMultiplier *= 2f;
|
||||
}
|
||||
|
||||
if (_isBiggerFontHeightTM220)
|
||||
{
|
||||
effectiveHeightMultiplier *= 2;
|
||||
effectiveHeightMultiplier *= 1.2f;
|
||||
}
|
||||
|
||||
int fontSize = baseHeight * effectiveHeightMultiplier;
|
||||
int fontSize = (int)(baseHeight * effectiveHeightMultiplier);
|
||||
styles.Add($"font-size: {fontSize}px");
|
||||
|
||||
// Letter spacing for width scaling (approximate)
|
||||
if (effectiveWidthMultiplier > 1)
|
||||
{
|
||||
int letterSpacing = (effectiveWidthMultiplier) * baseWidth / 2;
|
||||
int letterSpacing = (int)((effectiveWidthMultiplier) * baseWidth / 2);
|
||||
styles.Add($"letter-spacing: {letterSpacing}px");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user