Restore WebGL control overlay and page grid
This commit is contained in:
@@ -120,6 +120,7 @@ class BookTextureRendererModule extends BaseModule {
|
||||
const metrics = this.metrics;
|
||||
const fontPx = Math.max(1, Number(lineRecord.fontPx || 22));
|
||||
const lineHeightPx = Math.max(fontPx + 2, Number(lineRecord.lineHeightPx || metrics.typographyLineHeightPx || 30));
|
||||
const fontStyle = lineRecord.fontStyle === 'italic' ? 'italic ' : '';
|
||||
const line = lineRecord.line || {};
|
||||
const nodes = Array.isArray(line.nodes) ? line.nodes : [];
|
||||
const baseY = metrics.content.y + (Number(lineRecord.pageLine || 0) * lineHeightPx) + fontPx;
|
||||
@@ -133,7 +134,7 @@ class BookTextureRendererModule extends BaseModule {
|
||||
: Number(line.offset || 0);
|
||||
let x = metrics.content.x + centerOffset;
|
||||
|
||||
ctx.font = `${fontPx}px ${metrics.typography.fontFamily}`;
|
||||
ctx.font = `${fontStyle}${fontPx}px ${metrics.typography.fontFamily}`;
|
||||
nodes.forEach((node, index) => {
|
||||
if (!node) return;
|
||||
if (node.type === 'box' && node.value) {
|
||||
|
||||
Reference in New Issue
Block a user