summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Font.cxx
AgeCommit message (Collapse)Author
2020-03-03Qt5 just ignore invalid font attributesJan-Marek Glogowski
This ignores the *_DONTKNOW and _FORCE_EQUAL_SIZE values, except for the stretch, where we map DONTKNOW to QFont::AnyStretch. Change-Id: Ifdf55e798566681852ad4b585f4aeb0ebfbd1cf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89884 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-03-02Qt5 unify font attribute conversionsJan-Marek Glogowski
Adds conversion functions for VCLs FontWeight, FontWidth and FontItalic to Qt5FontFace and remove the partial "switch" tables from KF5SalFrame. And correctly handle the FontWidth in Qt5Font as the stretch value, so the default font in qt5 gets the correct stretch and doesn't look bold. Change-Id: I698986416dff13e6dfaf9dfa7f95851b89e9137d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89813 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-30Move SalGraphics glyph functions into FontInstanceJan-Marek Glogowski
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>
2018-10-09-Werror,-Wimplicit-fallthroughStephan Bergmann
("fallthrough annotation in unreachable code") Change-Id: I858937b439333b851942de9ca8f50ec228e77a76
2018-10-09Qt5: fix build with Qt 5.11Jan-Marek Glogowski
And while at it annotate Qt5Font fall-throughs. Change-Id: I31a73407f3228f303236983df17c66bc88eef6c5 Reviewed-on: https://gerrit.libreoffice.org/61557 Tested-by: Jenkins Tested-by: Rene Engelhard <rene@debian.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2018-09-05kde5: cleanup cargo-culted empty dtorsThorsten Behrens
Change-Id: I8f987e30b2a78e173fd8f3ebb9f33e4720f6588b Reviewed-on: https://gerrit.libreoffice.org/60011 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-08-22rename FontSelectPatternAttributes to FontSelectPatternCaolán McNamara
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>
2018-08-22turn the cache around to work on LogicalFontInstanceCaolán McNamara
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>
2018-07-06Qt5 flesh out font handlingJan-Marek Glogowski
Fills some more FontAttributes based on the QFont. Also implements initial font rotation support. Something is still strage with the vertical font in Writers vertical ruler. Text looks correct in vertical text boxes FWIW. The toRectangle bug is embarrassing; I was wondering for quite some time, which glyphs had strange size rects :-) While at it, move the Qt5Font header to vcl/inc/qt5. Change-Id: I67fa400486981035be6f98c5ab56e82d69c42065
2018-06-01Make clang-format happy, remove vcl/unx/kde5 from blacklistKatarina Behrens
just between us girls, I hate you clang-format Change-Id: I4cd041eff7a9fa01eb9192cf357e3f07a26fa6ad
2018-06-01Qt5 fix font drawingJan-Marek Glogowski
The main problem was the memory management of the harfbuzz memory blob. Now we copy the font data tables into the blob, as the QByteArray memory will be freed at the end of the function. Change-Id: If5a5a4b1a235e66ba472b28a156e16be1b82bf2e
2018-05-08Refactor CommonSalLayout font handlingJan-Marek Glogowski
Moves all platform specific code from CommonSalLayout into the platform specific plugins. This way the vcl library won't depend on the Qt5 libraries and the Qt5Font header can be moved into the qt5 VCL plugin. While at it, switch the CommonSalLayouts font reference from the FontSelectPattern to the LogicalFontInstance and also add the harfbuzz font handling to the instance. Change-Id: Ida910b8d88837ea949a2f84394ccc0cfae153060 Reviewed-on: https://gerrit.libreoffice.org/47408 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2017-11-08Retrofit "KeepEmptyLinesAtTheStartOfBlocks: false" into .clang-formatStephan Bergmann
...even if that can cause reformatting of already formatted code. The problem I came across is that without this something like > namespace { > > void f1(); > > void f2(); > > } (which is quite a common style in the current code base) would be changed to > namespace > { > > void f1(); > > void f2(); > } instead of > namespace > { > void f1(); > > void f2(); > } and I found no other clang-format style option that would result in the presence or absence of an empty line be identical at the start and end of the namespace block. vmiklos asked to reformat the existing new (i.e., non-blacklisted) files at the same time, so this commit includes that. Some of those new files had not been formatted at all, so this commit includes their full reformatting changes. Change-Id: I54daf0c11098d07d02c802104cf7f56372e61f7c Reviewed-on: https://gerrit.libreoffice.org/44450 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-06QT5 first stab on implementing CommonSalLayoutJan-Marek Glogowski
CommonSalLayout doesn't rally have an interface. It's cluttered with #ifdefs. Currently we have to move the Qt5Font into the VCL library. Someone should refactor this... Doen't render any text yet, but reports some sizes. Eventually that would cut down the public interface again. Change-Id: I12f32affb05b37e070c6cbc80db01779f84590b6