forked from amazingfate/loongoffice
This code is bogus in multiple ways: * It scales text based on ascent or descent, but this makes no sense as those control line height and nothing else, if one is to scale two different fonts to “fit” together, cap or x height would be more appropriate. This results in some text being ridiculously shrunk. * Not only that, but it is comparing apples to oranges; original font ascent/descent with the bounding box of the fallback glyphs, which results in different scale ratios depending on the shape of the glyphs at hand, which leads to all sorts of funny and irregular text. * Even worse, the PDF export is completely broken in this case; it uses the scaled down glyph widths but the unscaled font size, resulting in cramped unreadable text. Change-Id: Iaa6117ecfdad8388887d9a03b538e7327544ad5e Reviewed-on: https://gerrit.libreoffice.org/4293 Reviewed-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Tested-by: Bosdonnat Cedric <cedric.bosdonnat@free.fr> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Visual Components Library is responsible for the widgets (windowing, buttons, controls, file-pickers etc.) operating system abstraction, including basic rendering (e.g. the output device).
VCL provides a graphical toolkit similar to gtk+, Qt, SWING etc.
source/
+ the main cross-platform chunk of source
inc/
+ cross-platform abstraction headers
vcl/
+ public headers ("public" to the rest of LibreOffice, that is)
generic/
+ shared helper code for *some* of the backends, actually built into vcl.
headless/
+ a backend renderer that draws to bitmaps
android/
+ Android backend (work in progress, does work to some extent)
aqua/
+ OS X backend
ios/
+ iOS backend (work in progres, does not work, needs re-think
and re-write)
win/
+ Windows backend
unx/
+ X11 backend and its sub-platforms
plugadapt/
+ pluggable framework to select correct unx backend
gtk/
+ GTK2 support
gtk3/
+ GTK3.2+ support
kde/
+ KDE3 support
kde4/
+ KDE4 support
generic/
+ raw X11 support
How the platform abstraction works
+ InitVCL calls 'CreateSalInstance'
+ ths is implemented by the compiled-in platform backend
+ it stores various bits of global state in the
'SalData' (inc/saldatabasic.hxx) structure but:
+ the SalInstance vtable is the primary outward facing gateway
API for platform backends
+ It is a factory for:
SalFrames, SalVirtualDevices, SalPrinters,
Timers, the SolarMutexe, Drag&Drop and other
objects, as well as the primary event loop wrapper.
Note: references to "SV" in the code mean StarView, which was a
portable C++ class library for GUIs, with very old roots, that was
developed by StarDivision. Nowadays it is not used by anything except
LibreOffice (and OpenOffice).