Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I79e065f0c68b149d2ef69f428d31e36e97a6098b
|
|
The old SimpleWinLayout::GetNextGlyphs() did it.
PDFWriterImpl::drawVerticalGlyphs() expects GF_ROTL etc to be set when
necessary for vertical text when exporting to PDF.
Change-Id: I325d6e9f75a3bc51f24add33dd3bffe7b3c7bee0
|
|
...as the source files themselves include standard headers, which must not be
included from within a namespace (which confuses clang-cl). According to Tor,
the original intent was to try not to pollute the global namespace, but that
seems to cause no problems in practice (esp. as nothing from these files gets
exported).
Change-Id: I204c1db932996a09d16e84dd5c6033caa5362caa
|
|
Change-Id: I1ad03056497f39ca294a8abaffd7e069227a704e
|
|
Change-Id: Ie05ae7b82c59c7ab27f549210ac305e2cd38b68c
|
|
Change-Id: I5975af2801560c61ca72ab25f5d1222cf847c4e3
|
|
We don't support cross-compiling with MinGW currently, and in any case
if we ever attempt such again, in the meantime the free replacement
Win32 headers most likely have been updated to include the
SCRIPT_CONTROL::fMergeNeutralItems field, so no conditional
compilation is needed.
Change-Id: I38701d6c41c44952466c1ece7c8433abe67642be
|
|
Change-Id: Ib1f06cb5f925535858bc14aab6f59ad7fd2a3a8d
|
|
Change-Id: I7053f16c25f5506d15ebc88f1b0465493dd35077
|
|
Work in progress. Produces visible text in some cases, but not nearly
all. The text that is visible is roughly in the right place and of the
right size, but horribly ugly. Compare to glyphy-demo, which does
produce beautiful text, so the problem is not in the GLyphy code but
in the way we use it.
Include sources from GLyphy's "demo" directory (with only slight
modifications to avoid unconditional debug output) and use that "demo"
API from vcl.
The changes to existing vcl code are all in one place, in the
winlayout.cxx file.
Change-Id: I69cce5d66db534c6f4c1ab85d520b6090baf8fe0
|
|
This fixes a buffer overflow writing over the end of pCaretXArray,
which can happen e.g. when drawing mnemonics in the password dialog.
Based on a similar calculation of nCurrIdx found in
GenericSalLayout::GetCaretPositions().
Change-Id: I7d723cf8cfaeb66f340c7d9ea5b3bc728c6d6209
Reviewed-on: https://gerrit.libreoffice.org/19385
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
When UniscribeLayout::LayoutText(ImplLayoutArgs & rArgs) is run with
BiDiRtl flag, and some skipped VisualItems was reversed in lines 908-927,
it's possible that they will arrive in reverse order to the code adjusting
mnSubStringMin, so this assertion may fire.
This situation is not erroneous, so simply replacing the assert with "if".
Change-Id: Icb244502dd00b4c08a2c5192369ee66d743b0dcc
Reviewed-on: https://gerrit.libreoffice.org/19835
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
|
|
At least for the Cambria font, instead of a precombined glyph,
Uniscribe ends up using a separate diacritic glyph for some (all?)
accented Latin characters. That caused weird layout errors in
justified lines when an accented character was followed by space: The
diacritic got separated from the base character.
Fix that specific case. Be careful not to mess with any other cases.
While debugging this I added lots of temporary debugging
printouts. Leave some helper functions for that behind, inside #if
0. Maybe we should start collecting such functions, including ones for
most common Win32 structs, in some include file in some common
location?
Change-Id: Ib0198411f820cb8ba8456786869185a43628628c
|
|
the mpStr and mnLength arguments are always created from an OUString
and the OUString aRun(rArgs.mpStr); creates a duplicate of the original
string. Its way faster to pass the original OUString around instead.
Change-Id: I3de0cc31654eb215362548b6aee435f9c0c3c9db
Reviewed-on: https://gerrit.libreoffice.org/19221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I212bb442bdffa38d77e7e7357199c39420fa7951
|
|
Change-Id: I4525b43fa823d743b86bf4136c56af35274085e6
Reviewed-on: https://gerrit.libreoffice.org/18995
Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org>
Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
|
|
Change-Id: I73135440321c7c9898f758cb7a921d62f2265bcb
|
|
... claims https://en.wikipedia.org/wiki/Uniscribe - #ifdef this so it
can be removed when dropping XP support.
Change-Id: I9a51635cf9bb4876faf6dca011e6da9e1c2dc35d
|
|
Change-Id: I0caab3b69b10aba6a5d45a11f8e9724b4d3c6d83
|
|
Change-Id: I09db7262c2a6180a078620ba086dd7a4c132bd82
Reviewed-on: https://gerrit.libreoffice.org/18459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Reviewed-by: Martin Hosken <martin_hosken@sil.org>
|
|
Change-Id: I4a7199633d0d940ae009ac144989da7d6c9262ec
Reviewed-on: https://gerrit.libreoffice.org/18378
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Cached glyphs used to have a 2px border in all font sizes, that's too
small for larger fonts. Make the border size depend on the font size for
larger fonts to make sure that the rendered glyphs are indeed
independent. The introduced GLYPH_SPACE_RATIO = 8 constant is the
smallest value where I don't see overflows anymore for large fonts.
With this, not even the bugdoc renders correctly when presenting, but
also the text is OK when the font size is set to the max allowed by the
UI (96pt).
Change-Id: I52aa5c4444583fc0467291463697a63f2b8fc86c
|
|
The problem was UniscribeLayout::DrawCachedGlyphs() counted the total
advance value unconditionally from mpGlyphAdvances, while
UniscribeLayout::FillDXArray() (which provides advance values to e.g.
Writer) only used mpGlyphAdvances in case of NULL mpJustifications. Fix
this by first checking mpJustifications in
UniscribeLayout::DrawCachedGlyphs(), too.
With this, e.g. typing "x" in Writer 10 times will not result in a
"misplaced" cursor caret.
Change-Id: I16c7a258ff77b25c5121b9b974e72ad6efe5e9fc
|
|
For one, aPos.Y() is meant to be the baseline position of the text.
Based on the MSDN documentation and
<https://www-user.tu-chemnitz.de/~ygu/petzold/ch05c.htm>, that means if
we want to get top position, we have to only extract tmAscent and not
tmInternalLeading.
For another, ImplWinFontEntry::AddChunkOfGlyphs() adds a border of 2
pixels both horizontally and vertically, which means that then we need
to undo that when counting the vertical position, too.
Change-Id: I4ac8e881ea5910662674c2a1b53ece943487ccd9
|
|
Should do similarly for vertical text, too.
Change-Id: I51f5ee3ba1686f151b04f98c43388e0bdfac97fb
|
|
Follow-up to 34700400247e378e074ce4164ab2809edb092201; this fixes sw_ww8export
unit test on Windows.
Change-Id: Ic0c3228efb59a182e1562b73117418cd8b5e6017
|
|
SAL_DETAIL_ENABLE_LOG_INFO is always defined, as "true" or "false". It
is SAL_LOG_INFO that is defined or not, and can be used to avoid
unnecessary non-trivial code that the compiler might not be able to
optimise away.
Change-Id: I9903faab64b39fee86bff3b085cdce3614b0d921
|
|
Change-Id: I1491ea35af3b8237a9b8f6357e6452b323139e99
|
|
Can't call a function that as a side effect prints to std::cerr in
SAL_INFO. It will be called even if the log area doesn't match
$SAL_LOG. Just use only SAL_INFO and no plain std::cerr output. It's
fine to output a string with embedded newlines in SAL_INFO.
Also drop the debug output line with the glyph start positions, it was
less than useful.
Change-Id: I9fb5ed068aae1b835e20cf1ec1097bcd55deb05d
|
|
Since commit 65a66d41fd0e13d0aad9df935091b731b4af650a the
sd_exports_test crashes on Windows in UniscribeLayout because
it uses a ImplFontEntry that has been removed from the font cache.
Tweak the refcount in WinLayout so it will be valid.
Change-Id: Ic4bf984ea9fd70de9fa95ca964ae12d95d47d5bf
|
|
Change-Id: I67d2430aec782efa7916856584028f469d39355c
|
|
Change-Id: I918a47da16a539f981baa9a8c1e5a7a5cf642cf4
|
|
It says there's access to uninitialized variable on that line,
so propbably the loop is running over.
Change-Id: I0226f82b20a6fbbc79af5bbb46af09830c3bc25a
|
|
Can now be turned off with a SAL_DISABLE_GLYPH_CACHING environment variable.
Change-Id: I7ac14d72dc0f85c0682d92492eb96bec1d207609
|
|
That is a too complex and rare case to bother with, I think.
Change-Id: Ica6ef7fa05314d2367dcff32627c1aec6ba8f8df
|
|
Change-Id: I7b06d0ffe53c6ebf2b479951321dcb37cb22c355
|
|
Change-Id: I46e5463aaa5cab41cd69c13314ee98a0c73e7ba2
|
|
Change-Id: I6b19873eef48b625dc3d4f7b3a9afdb348189b38
|
|
The text alignment of DCs is set to TA_BASELINE in
WinSalGraphics::InitGraphics(). In the ScriptTextOut-using old code
path this affects where glyphs are put, so we need to take it into
consideration also in the new code path that uses cached glyph
textures. Adjusting the position up by the ascent plus internal
leading of the font seems to work at least for horizontal scripts.
(We used to bluntly adjust the position up by the height of the glyph
cache texture, which was too much. The glyphs got positioned too high
and the top of tall ones was clipped.)
Change-Id: I86aecd6f3016e14b2f0328555ddfd3129e394c4c
|
|
Change-Id: Id023b43e901b0e41ebf3b208c6e80fd023bf7f9a
|
|
Show the whole height of the cache bitmap after all (when SAL_LOG
contains vcl.gdi.opengl). The interesting pieces are often at the
bottom, like the tip of the hook of the "j" glyphs that used to bleed
over into the preceding glyphs, usually "i", when they were rendered
into the same chunk.
Add more space between glyphs and at top and bottom of the bitmap, for
anti-aliasing. The glyph ABC widths don't take expansions caused by
anti-aliasing into consideration and are misleading. Hopefully
anti-aliasing can expand the (partially) painted pixels of a glyph
just one column/row in each direction, but for safety use a two-pixel
border. (Defensive programming, eek?)
Some getWidth() instead of GetWidth() etc craziness. Using
<tools/gen.hxx> types truly is programming-by-coincidence as Thorsten
says.
In a dbgutil build, setting the environment variable
VCL_GLYPH_CACHING_HACK_NO_ANTIALIAS causes the code to turn off
anti-aliasing for the fonts used. I used this to verify that it indeed
was anti-aliasing that made the ABC widths inconsistent with
reality. Not sure if it makes sense to keep this code in?
Anyway, now I don't see any leaked pixels in "i" glyphs any more,
touch wood.
Change-Id: If527343ff1dcdb1fa208cd5e7fa4d08f812d0d7b
|
|
Change-Id: I29cb771eb059f560b7cbd449257ffda581b40f11
|
|
Change-Id: I934ad7453f35909f4c3ad999e33453b5b6032480
|
|
Now text looks better, for instance the lower-case "t" glyphs on the
Start Centre aren't totally weird any more. But for instance the tip
of the hook of "j" leaks into the "i" texture. I guess I really would
need to render glyphs one by one.
Change-Id: I69ae2d2f7c559530bcfdfc1a4915503fcb3ab4af
|
|
Change-Id: I0bbea4ef62c8e94d8b8f1bfb440712da5839e532
|
|
Shows text roughly correctly, but many problems. Conditional at
run-time on the SAL_ENABLE_GLYPH_CACHING environment variable in
addition to SAL_FORCEGL.
One obvious thing that needs fixing is making sure that the glyphs are
rendered into the texture without overlap. Compensating negative
values in the ABC::abcA and ABC::abdC width is not enough.
Also, the cache should be changed to actually have "cache"
functionality, i.e. entries should expire based on some criterion.
Change-Id: I66a37d3354a09011a654f15a7d2bd8efaa14ad1e
|
|
Change-Id: Ia41882a4d33e7b148044801902517b2b034d3ee4
|
|
Use Uniscribe also for non-complex text. It is complicated enough to
have separate Graphite and Uniscribe layout engines. Will make further
changes to the code easier to manage, especially as with the
UniscribeLayout code we have access to the actual
glyphs. (Cf. 3e47219e06b9a279ba22a9bbef668731f2d3e07d)
Change-Id: I9c67c172fe3e3d26d1c6cb1c0b7f1516b0b87f12
|
|
Remove dead code. Should have no effect on behaviour.
Possibly originally the intent was that mbDisableGlyphs would have
been false in most cases on NT-based Windows (all versions that we
support now). However, since dadfc60873d4dce4e0c46e1d3405f8d45535cdcf,
in 2005, mbDisableGlyphs was set to always true in the SimpleWinLayout
ctor.
Change-Id: Id929224d5656706762c2f44ee26c76f8b20ee8b8
|
|
Change-Id: I0d0cb1ef1e7b7f4747204b84c7c910f174e9c7b5
|