Age | Commit message (Collapse) | Author |
|
- moved PhysicalFontFace.hxx to vcl/inc/font
- added PhysicalFontFace to vcl::font namespace
- had to regenerate precompiled_vcl.hxx
- tested PhysicalFontFace, with some extensive tests for
IsBetterMatch()
Change-Id: I860022ac244f8a827f6f9cb7ed9018c5d9c328cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121970
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I2f01a8e67c52ece9b434777203aa9fbc9ac8be02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122613
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
|
|
The OutputDevice::GetDevFontSize() function is only used for
non-scalable (bitmap) fonts. We have stopped supporting bitmap fonts
since LO 5.3, see tdf#103514: Support for bitmap-only fonts on Windows
has been removed (Khaled Hosny)
I found the following when removing PhysicalFontFace::SetBitmapSize():
1. as mnHeight and mnWidth and not set by anyone, I realized I could
remove them, which meant removing GetHeight() and GetWidth()
2. PhysicalFontFamily::GetFontHeights() populates heights from the
collection of font faces into a sorted vector of font heights taken
from PhysicalFontFace. As this no longer exists this function
serves no purpose, it has been removed.
3. PhysicalFontFamily::GetDeviceFontSizeList() calls upon
PhysicalFontFace::GetFontHeights(). This function takes this sorted
list of font heights, and then populates and returns a new list of
sizes (or rather, heights). As the heights aren't available any
more, this function is also unneeded, so it has been removed.
4. OutputDevice::GetDevFontSizeCount() calls upon
PhysicalFontFamily::GetDeviceFontSizeList(). This function has the
side effect of initializing the list of fonts.
5. When I checked what calls on GetDevFontSizeCount(), there is only
one caller - FontList::GetSizeAry() in svtools. The function returns
a standard font size list if the family name is empty, or there are
no font sizes (via OutputDevice::GetDevFontSizeCount()). As this
will *always* be empty (see chain above) then this function just
needs to always return a standard font size list.
Thus OutputDevice::GetDevFontSizeCount() and GetFontSizeList() are
no longer called upon by anything, so they can be removed.
6. svtool's FontList::GetSizeAry() no longer uses the FontMetric
parameter, so this has been removed from the function signature, and
cleanup done of the function that calls upon it in svtools,
framework, editeng, and desktop. A number of variables that were no
longer used due to this change were also removed.
7. This change removed the need for the mpSizeAry unique_ptr in
FontList. ImplFontListFontMetric::GetDevice() and mpDevice could
also be removed as it was no longer used anywhere.
8. After simplifying GetSizeAry(), it turns out it was the same as
GetStdSizeAry(), so removed FontList::GetSizeAry() and used
FontList::GetStdSizeAry() in its place.
9. Changing to use GetStdSizeAry() revealed that FontSizeBox::Fill()
no longer used the pFontMetric paramter, so this was removed, and
call sites updated.
10. Due to change to Fill():
a. SvxFontSizeBox_Base::UpdateFont() no longer uses the
const css::awt::FontDescriptor& rCurrentFont parameter, so
removed this. This also removed the member variable
m_aCurrentFont
b. SvxCharNamePage::FillSizeBox_Impl() had a number of newly
unused variables removed.
c. SwStdFontTabPage::Reset() and
SwStdFontTabPage::LoseFocusHdl() had a number of newly unused
variables removed.
Change-Id: If840e240155c36ed351c63e3136b5b44bb058697
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121932
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Nothing uses PhysicalFontFace::SetBitmapSize(), so remove it. This in
turn meant that the class doesn't ever use CompareWithSize() directly,
as this calls on CompareIgnoreSize() when no width or height is set I
have removed CompareWithSize().
Change-Id: I1012ffd3bc0f39f917a8b725f9985844967533dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121931
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
- Adds a series of unit tests for PhysicalFontFamily
- Moves PhysicalFontFamily into vcl::font
- Move PhysicalFontFamily.hxx into vcl/inc/font
This is part of a series of patches where I also move font files into
the relevant font directories, and into the vcl::font namespace.
Change-Id: I9e8d7ceb5ec3494bf3ab6560645e52e88223ee69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121903
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
The convention is that we need to add sal/config.h to the start of
files.
I have a patch queued to test PhysicalFontFamily and move it to
vcl::font. Submitting patch to update the modelines in the files
that I will change in that patch.
Change-Id: I92275250bc5e12f7e6f7c0d4b6405d6a6e8de033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122179
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Ice1055021e8568634e9a66ba89d3bb4ef4e731df
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104522
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This makes GetFontCapabilities and GetFontChatMap members of the
PhysicalFontFace. These are implemented in all the real font face
classes anyway. Also provide dummies for the PDF buildin fonts.
Change-Id: Icb8cb14480ce1e020977b8f69892095d787982ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102683
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Tested-by: Jenkins
|
|
As we already rely on the GlyphItem's font instance, consequently
this removes the SalGraphics GlyphItem based functions. Also
unifies the glyph bound rect cache handling.
An interesting aspect is the rotated glyph bounding box handling
moved from CairoTextRender to FreetypeFont. It doesn't look like
an implementation detail for Cairo, so it may have been a bug.
Change-Id: I81bbb5d8ee98fb77a1eee05568c456f9e4553023
Reviewed-on: https://gerrit.libreoffice.org/62503
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: I2c018e2e61707c0d89178b0cb38a0918906e23cb
Reviewed-on: https://gerrit.libreoffice.org/59390
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
instead of a FontSelectPattern with an associated LogicalFontInstance
use a LogicalFontInstance with owned FontSelectPatternAttributes
Change-Id: I939f84731fcb8db5ff6484dcfbd2f9199bb50d23
Reviewed-on: https://gerrit.libreoffice.org/59388
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ie758f8677ac9fdd573484c467b7f021cd055adb6
|
|
Change-Id: I5d0ca9059bc5717b345332e18ef983db982a2966
Reviewed-on: https://gerrit.libreoffice.org/59316
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
since we are now holding these via reference counting, no need to clone
them
Change-Id: I7b0bd86f4a5bca428f7dcd989f838a9aa0c7e179
Reviewed-on: https://gerrit.libreoffice.org/55427
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
instead of manual reference counting.
Also the releasing of not-currently-in-use LogicalFontInstance objects
from the cache is made less aggressive - we now only flush entries until
we have less than CACHE_SIZE instances, instead of flushing the whole
cache.
Change-Id: Ib235b132776b5f09ae8ae93a933c2eebe5fa9610
Reviewed-on: https://gerrit.libreoffice.org/55384
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8f66b5afb066fe83abb83c56ebde6f21197f894b
Reviewed-on: https://gerrit.libreoffice.org/55333
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
A FontSelectPattern describes a general font request. It can be
used to find the best matching LogicalFontInstance. The instance
will be created based on a PhysicalFontFace, which is really a
factory since commit 8b700794b2746070814e9ff416ecd7bbb1c902e7.
Following this workflow, this moves the PhysicalFontFace pointer
to the instance and makes it constant.
Which leaves some special symbol font handling code in the hash
and instance lookup code path. It used to query the font face
directly from the instance.
I'm not sure of the correct handling. The related commits where
made to fix #i89002#, which has an attached test document.
1. commit 849f618270da313f9339dda29a9f35938434c91d
2. commit 8c9823d311fdf8092cc75873e4565325d204a658
The document is as broken as it was before the patch. The symbol
substitution still works, but the 'Q's are missing when displaying
a symbol font.
I also don't understand all the reinterpret_casts for fake font
ids. I guess this was used to prevent the crashes I see, where a
PhysicalFontFace referenced in a valid LogicalFontInstance is
freed and a later FontId check in the GlyphCache crashes. So this
now checks for a valid cache instead.
Change-Id: If8ee5a6288e66cfa4c419289fbdd5b5da128c6ea
Reviewed-on: https://gerrit.libreoffice.org/47279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
This way LogicalFontInstance can just be constructed by a
PhysicalFontFace based factory.
The patch also drops the wrong "Java logical font" comment
added by commit 125cdf3404e60cf78f2a5547e9a06ce994df5c8e.
Change-Id: Ibd5d7da0c3a65dbfa2c8ae6b05cf616d39b749f2
Reviewed-on: https://gerrit.libreoffice.org/46475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
This drops the bPaintEnd optimization for vertical and horizontal
lines on Windows, where Polyline and LineTo exclude painting the
last pixel of the line. Instead we just always set the last pixel.
It also merges the various "SetPixel" call sites into a common
drawPixelImpl function.
Change-Id: I01cc3c01c908ba74f7978fa90eaaf8d88f923ae3
Reviewed-on: https://gerrit.libreoffice.org/43939
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
These flags mean nothing these days, there are either always true or
always false, since we no longer support bitmap or Type 1 fonts.
Change-Id: Ie14ca480225a6346d868a44e58e7666c3a06931d
Reviewed-on: https://gerrit.libreoffice.org/31346
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
|
|
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs
Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
ImplFontAttributes is no longer merely a pImpl (or "compilation
firewall", take your pick) but is a fully fledged class in its
own right that is used by a number of classes, including
FontSelectPattern, LogicalFontInstance and PhysicalFontFace. Thus
I'm "promoting" the use of this class in the codebase.
Change-Id: I26866080a64796978d1c25efbcd16e3e6f94aaa5
Reviewed-on: https://gerrit.libreoffice.org/21305
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
There is a TODO in the code that suggests to do this, when I looked at the
collaboration diagram on Doxygen things made a LOT more sense.
Change-Id: If335498bb70872ffa5738cc5c17660faec84c35e
Reviewed-on: https://gerrit.libreoffice.org/21257
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: I174a7a87d68958d0a5dd7c3e0f35294f0d020eb1
Reviewed-on: https://gerrit.libreoffice.org/21189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: Ifa10c3b954dd245ff8357b790b59316b3fb111a9
|
|
Change-Id: I74cde57e328047ac149593c5bb065d7a6066941d
Reviewed-on: https://gerrit.libreoffice.org/21056
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
The *only* things relying on the in-built magic number are PDFFontCache
and PDFWriterImpl. PDFWriterImpl::emitBuiltinFont has as its first
parameter a const PhysicalFontFace*, but this is only called upon by
PDFWriterImpl::emitFonts, which instantiates an ImplPdfBuiltinFontData
object from a built-in font map... so basically it is always guaranteed
to get a ImplPdfBuiltinFontData object. ImplPdfBuiltinFontData derives
from PhysicalFontFace, so to prevent the need to check the class being
used is a ImplPdfBuiltinFontData, just make emitBuiltinFont require as
it's first parameter ImplPdfBuiltinFontData!
Unfortunately, we can't get around RTTI completely, because
PDFFontCache::FontIdentifier requires a way of distinguishing between
two different PhysicalFontFaces...
Change-Id: I74c8cd294580bbecd12dd2427ac405f97a7e7f7e
Reviewed-on: https://gerrit.libreoffice.org/21030
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
This reverts commit 60676b3b376d5f3f6fb29fa68c34117c2149bbec.
The FontMapStatus structure is passed as a reference to save the
search state outside of the search loop in
PhysicalFontFamily::FindBestFontFace.
This *looked* like it would be an easy win, evidently not! Back to
the drawing board.
Change-Id: Icc7078543e50bc34221127d8df055f056e249cdb
|
|
Always wanted to write a commit that said this.
Change-Id: I52f6a188e2d115eef9a1e3f702ed127fea3ebb4c
|
|
It's used exactly once, as a parameter of PhysicalFontFace::IsBetterMatch()'s
function signature. That parameter only acts as input, so I think this is a
case of YAGNI creeping into the code, thus I'm getting rid of it.
Change-Id: Ic5e24f484d652ba2196e512795d0d27f4239df30
|
|
ImplFontAttributes handles device independent data, whilst
ImplDevFontAttributes handles device dependent data. However, there
is no real reason for the divide in classes, and in fact I'm not at
all a fan of using a pImpl directly - sort of defeats the purpose of
having one!
Change-Id: I2db22727e3479b14e3bc37dfad9136703bbdeb13
Reviewed-on: https://gerrit.libreoffice.org/21018
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: I8e767ed61b93e1099f6e10ef77e813ba4e8d22db
|
|
The internal linked list has now been removed from PhysicalFontFace
and a std::vector is used within PhysicalFontFamily, which is the
class that actually should be managing the storage of font face
instances.
Change-Id: I4f0c5f8831c3f3b60b81b814ca8ea8e2f2e1e7a9
Reviewed-on: https://gerrit.libreoffice.org/20922
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: I12356b3fdce68282a30cae2b270b02e46558860a
Reviewed-on: https://gerrit.libreoffice.org/16847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
|
|
This cleanups up indentation and removes dead classes.
This is a followup patch to commit
272b1dd55797aacf511fb4342b0054e3697243f6
"new loplugin: change virtual methods to non-virtual"
Change-Id: I1c2139589cf8cb23bb9808defe22c51039d38de1
|
|
Where we can prove that the virtual method is never overriden.
In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.
Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
|
|
Change-Id: Ie6e8d4272b0b1d0d2ce93bcbc2e818a9eac1a56b
Reviewed-on: https://gerrit.libreoffice.org/9629
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
|
|
Change-Id: I81ce8fd7022bf283db668705efdfb0666f87bde9
|
|
oudev,2,3,4,5,6 are a dumping ground for a lot of things
chipping at it one class at the time...
organize the #include of the impacted source while at it.
Change-Id: I57bbb1f9e3c6b2ac6b3ca127e5976bf16f3e3cf8
|