Fix typos

reviewable/pr6897/r1
Jellby 4 years ago committed by poire-z
parent 4a6f8769ae
commit f892d4559f

@ -764,7 +764,7 @@ function ReaderRolling:onUpdatePos()
-- so updatePos() has good info and can reposition
-- the previous xpointer accurately:
self.ui.document:getCurrentPos()
-- Otherwise, _readMetadata() would do that, but the positionning
-- Otherwise, _readMetadata() would do that, but the positioning
-- would not work as expected, for some reason (it worked
-- previously because of some bad setDirty() in ConfigDialog widgets
-- that were triggering a full repaint of crengine (so, the needed

@ -185,7 +185,7 @@ function ReaderToc:validateAndFixToc()
nb_next = nb_next + 1
end
end
logger.dbg("BOGUS TOC:", i, page, ">", i-1, cur_page, "-", nb_prev, nb_next)
logger.dbg("BOGUS TOC:", i, page, "<", i-1, cur_page, "-", nb_prev, nb_next)
if nb_prev <= nb_next then -- less changes when fixing previous pages
local fixed_page
if i-nb_prev-1 >= 1 then

@ -1290,7 +1290,7 @@ function CreDocument:setupCallCache()
-- gotoXPointer() is for cre internal fixup, we always use gotoPage/Pos
-- (goBack, goForward, gotoLink are not used)
-- For some, we prefer no cache (if they costs nothing, return some huge
-- For some, we prefer no cache (if they cost nothing, return some huge
-- data that we'd rather not cache, are called with many different args,
-- or we'd rather have up to date crengine state)
elseif name == "getCurrentPage" then no_wrap = true

@ -98,7 +98,7 @@ local ImageWidget = Widget:new{
-- Whether to use former blitbuffer:scale() (default to using MuPDF)
use_legacy_image_scaling = G_reader_settings:isTrue("legacy_image_scaling"),
-- For initial positionning, if (possibly scaled) image overflows width/height
-- For initial positioning, if (possibly scaled) image overflows width/height
center_x_ratio = 0.5, -- default is centered on image's center
center_y_ratio = 0.5,
@ -258,7 +258,7 @@ function ImageWidget:_render()
end
bb_w, bb_h = self._bb:getWidth(), self._bb:getHeight()
-- deal with positionning
-- deal with positioning
if self.width and self.height then
-- if image is bigger than paint area, allow center_ratio variation
-- around 0.5 so we can pan till image border

@ -332,7 +332,7 @@ function TextBoxWidget:_splitToLines()
end
if line.hard_newline_at_eot and not line.next_start_offset then
-- Add an empty line to reprensent the \n at end of text
-- and allow positionning cursor after it
-- and allow positioning cursor after it
self.vertical_string_list[ln+1] = {
offset = size+1,
end_offset = nil,
@ -483,7 +483,7 @@ function TextBoxWidget:_getLinePads(vertical_string)
return pads
end
-- XText: shape a line into positionned glyphs
-- XText: shape a line into positioned glyphs
function TextBoxWidget:_shapeLine(line)
-- line is an item from self.vertical_string_list
if line._shaped then
@ -494,7 +494,7 @@ function TextBoxWidget:_shapeLine(line)
-- Empty line (first check above is for hard newline at end of file,
-- second check is for hard newline while not at end of file).
-- We need to set a direction on this line, so the cursor can be
-- positionned accordingly, on the left or on the right of the line
-- positioned accordingly, on the left or on the right of the line
-- (for convenience, we have an empty line inherit the direction
-- of the previous line if non-empty)
local offset = line.offset
@ -721,7 +721,7 @@ function TextBoxWidget:_shapeLine(line)
xglyph.w = xglyph.x1 - xglyph.x0
-- Because of glyph substitution and merging (one to many, many to one, many to many,
-- with advance or zero-advance...), glyphs may not always be fine to position
-- the cursor caret. For X/Y/Charpos positionning/guessing, we'll ignore
-- the cursor caret. For X/Y/Charpos positioning/guessing, we'll ignore
-- glyphs that are not cluster_start, and we build here the full cluster x0/x1/w
-- by merging them from all glyphs part of this cluster
if xglyph.is_cluster_start then
@ -732,7 +732,7 @@ function TextBoxWidget:_shapeLine(line)
prev_cluster_start_xglyph.w = prev_cluster_start_xglyph.x1 - prev_cluster_start_xglyph.x0
end
-- We don't update/decrease prev_cluster_start_xglyph.x0, even if one of its glyph
-- has a backward advance that go back the 1st glyph x0, to not mess positionning.
-- has a backward advance that go back the 1st glyph x0, to not mess positioning.
end
if xglyph.is_tab then
xglyph.no_drawing = true

@ -141,7 +141,7 @@ function TextWidget:updateSize()
-- We never need to draw/size more than one screen width, so limit computation
-- to that width in case we are given some huge string
local tsize = RenderText:sizeUtf8Text(0, Screen:getWidth(), self.face, self._text_to_draw, true, self.bold)
-- As text length includes last glyph pen "advance" (for positionning
-- As text length includes last glyph pen "advance" (for positioning
-- next char), it's best to use math.floor() instead of math.ceil()
-- to get rid of a fraction of it in case this text is to be
-- horizontally centered

Loading…
Cancel
Save