Skip to content

Commit

Permalink
drop global prop for normal line-height
Browse files Browse the repository at this point in the history
  • Loading branch information
moben committed Sep 13, 2024
1 parent 4866836 commit de21aad
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion crengine/include/lvdocviewprops.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@
// use 0 for old crengine behaviour (no support for absolute units and 1css px = 1 screen px)
#define PROP_RENDER_DPI "crengine.render.dpi"
#define PROP_RENDER_SCALE_FONT_WITH_DPI "crengine.render.scale.font.with.dpi"
#define PROP_RENDER_NORMAL_LINE_HEIGHT "crengine.render.normal.line.height"
#define PROP_RENDER_BLOCK_RENDERING_FLAGS "crengine.render.block.rendering.flags"
#define PROP_REQUESTED_DOM_VERSION "crengine.render.requested_dom_version"

Expand Down
2 changes: 0 additions & 2 deletions crengine/include/lvrend.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,8 @@ bool getInkOffsets( ldomNode * node, lvRect &inkOffsets, bool measure_hidden_con
#define BASE_CSS_DPI 96 // at 96 dpi, 1 css px = 1 screen px
#define DEF_RENDER_DPI 96
#define DEF_RENDER_SCALE_FONT_WITH_DPI 0
#define DEF_RENDER_NORMAL_LINE_HEIGHT 0
extern int gRenderDPI;
extern bool gRenderScaleFontWithDPI;
extern int gRenderNormalLineHeight;
extern int gRootFontSize;

#define INTERLINE_SCALE_FACTOR_NO_SCALE 1024
Expand Down
7 changes: 0 additions & 7 deletions crengine/src/lvdocview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6730,7 +6730,6 @@ void LVDocView::propsUpdateDefaults(CRPropRef props) {

props->setIntDef(PROP_RENDER_DPI, DEF_RENDER_DPI); // 96 dpi
props->setIntDef(PROP_RENDER_SCALE_FONT_WITH_DPI, DEF_RENDER_SCALE_FONT_WITH_DPI); // no scale
props->setIntDef(PROP_RENDER_NORMAL_LINE_HEIGHT, DEF_RENDER_NORMAL_LINE_HEIGHT); // no scale
props->setIntDef(PROP_RENDER_BLOCK_RENDERING_FLAGS, DEF_RENDER_BLOCK_RENDERING_FLAGS);

props->setIntDef(PROP_FILE_PROPS_FONT_SIZE, 22);
Expand Down Expand Up @@ -7092,12 +7091,6 @@ CRPropRef LVDocView::propsApply(CRPropRef props) {
gRenderScaleFontWithDPI = value;
REQUEST_RENDER("propsApply render scale font with dpi")
}
} else if (name == PROP_RENDER_NORMAL_LINE_HEIGHT) {
int value = props->getIntDef(PROP_RENDER_NORMAL_LINE_HEIGHT, DEF_RENDER_NORMAL_LINE_HEIGHT);
if ( gRenderNormalLineHeight != value ) {
gRenderNormalLineHeight = value;
REQUEST_RENDER("propsApply render min normal line height")
}
} else if (name == PROP_FORMAT_SPACE_WIDTH_SCALE_PERCENT) {
int value = props->getIntDef(PROP_FORMAT_SPACE_WIDTH_SCALE_PERCENT, DEF_SPACE_WIDTH_SCALE_PERCENT);
if (m_doc) // not when noDefaultDocument=true
Expand Down
1 change: 0 additions & 1 deletion crengine/src/lvrend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@

int gRenderDPI = DEF_RENDER_DPI; // if 0: old crengine behaviour: 1px/pt=1px, 1in/cm/pc...=0px
bool gRenderScaleFontWithDPI = DEF_RENDER_SCALE_FONT_WITH_DPI;
int gRenderNormalLineHeight = DEF_RENDER_NORMAL_LINE_HEIGHT;

int scaleForRenderDPI( int value ) {
// if gRenderDPI == 0 or 96, use value as is (1px = 1px)
Expand Down
1 change: 0 additions & 1 deletion crengine/src/lvtinydom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ lUInt32 calcGlobalSettingsHash(int documentId, bool already_rendered)
// hash = hash * 31 + (int)fontMan->GetHintingMode();
hash = hash * 31 + LVRendGetBaseFontWeight();
hash = hash * 31 + gRenderDPI;
hash = hash * 31 + gRenderNormalLineHeight;
// If not yet rendered (initial loading with XML parsing), we can
// ignore some global flags that have not yet produced any effect,
// so they can possibly be updated between loading and rendering
Expand Down

0 comments on commit de21aad

Please sign in to comment.