Commits on Source 46

  • Zander Brown's avatar
    family: expose name etc as properties · ad9a8f4a
    Zander Brown authored
    They don't change of course, but this allows us to bind them in UIs
    ad9a8f4a
  • Jared Wahlstrand's avatar
  • Luca Bacci's avatar
    Merge branch 'win32build' into 'main' · 949b6404
    Luca Bacci authored
    use G_MAXUINT32 rather than UINT32_MAX to avoid build error on Windows
    
    See merge request GNOME/pango!702
    949b6404
  • Chun-wei Fan's avatar
    build: Check for DirectWrite/GDI support in HarfBuzz · 354912b7
    Chun-wei Fan authored
    Check whether we have DirectWrite support in our HarfBuzz installation if
    Cairo is built with DirectWrite support, or otherwise check whether HarfBuzz
    has GDI support enabled, as:
    
    * We could use a simpler code path if HarfBuzz contains the needed support,
      which, sadly, is not enabled by default.
    * Try the best to match what we will be using in Cairo when we create the
      hb_face_t for Pango, so if Cairo supports DirectWrite, we use DirectWrite
      for the hb_face_t if the HarfBuzz build supports that, otherwise we use
      GDI (like what we are doing now).
    
    If we are building HarfBuzz as a fallback subproject, enable DirectWrite and
    GDI support, since the Windows SDK (or mingw-w64) should supply the needed
    items.
    354912b7
  • Chun-wei Fan's avatar
    PangoWin32: Create hb_face_t using HarfBuzz platform APIs · 527e220a
    Chun-wei Fan authored
    ...if the HarfBuzz build has the applicable Windows-specific APIs enabled. This
    will simplify the codepath that is needed to create the hb_face_t for Pango
    that we need.
    
    Since the former method to create the hb_face_t in PangoWin32 appeared before
    HarfBuzz added GDI support, and we only supported DirectWrite in Pango later,
    only build the old code when neither DirectWrite nor GDI support in HarfBuzz
    is found/enabled.
    527e220a
  • Matthias Clasen's avatar
    Just use a single fontconfig thread · 89442dae
    Matthias Clasen authored
    In ac4d8f29, we switched from using
    GTask to using explicit threading for our fontconfig
    calls, since GTask assumes a mainloop and leaks memory
    otherwise. But now we are creating a new thread for
    every single fontconfig call, which is a bit excessive.
    As a compromise, create a single fontconfig thread
    per fontmap, and use an async queue to send fontconfig
    calls to that thread.
    89442dae
  • Matthias Clasen's avatar
    Merge branch 'fontconfig-thread' into 'main' · 7997d20c
    Matthias Clasen authored
    Just use a single fontconfig thread
    
    See merge request GNOME/pango!704
    7997d20c
  • Luca Bacci's avatar
    Merge branch 'simplify-win32-hb-face' into 'main' · 7217b2b2
    Luca Bacci authored
    PangoWin32: Use HarfBuzz platform APIs if possible
    
    See merge request GNOME/pango!701
    7217b2b2
  • Matthias Clasen's avatar
    Add a blurb about versioning · c732a643
    Matthias Clasen authored
    This was a topic of discussion recently,
    so clarify the current stance.
    c732a643
  • Matthias Clasen's avatar
    Avoid a race · f499ae5b
    Matthias Clasen authored
    Sent the async queue already reffed, instead of hoping that the
    new thread gets around to do the ref() in time.
    
    Related: #768
    f499ae5b
  • Matthias Clasen's avatar
    Merge branch 'avoid-a-race' into 'main' · 5b21227b
    Matthias Clasen authored
    Avoid a race
    
    See merge request GNOME/pango!705
    5b21227b
  • Sergey Bugaev's avatar
    layout: Count last-item space toward line width in more cases · 14d66efb
    Sergey Bugaev authored
    
    
    Normally, when Pango wraps a line after a space character, the space
    character itself is said to be collapsed, and is not counted towards
    the width of the line. This is implemented by adding a negative width
    adjustment (extra_width). This has been implemented in commit
    86303ad2
    "Handle break-after-space correctly", and a few follow-up fix-ups.
    
    There is a corner case: when the space we're trying to break at is the
    last character in the paragraph, it should not get collapsed. This has
    been implemented in commit 8ba98271
    "layout: Fix a cornercase of line width accounting". However, due to
    parts of the logic being duplicated in different places, that patch
    forgot to update some of those places. Fix that by not collapsing the
    space width in the other parts of the logic too.
    
    In practice, this manifested as a Pango layout reporting to be wider
    than its explicit width limit (layout->width), because the final space
    was counted as collapsed (negative extra_width) when deciding whether to
    break the line, and as uncollapsed when measuring the resulting line
    width afterwards. That was in turn causing issues in GTK, where a
    GtkLabel widget would get confused because of this fact, and report an
    incorrect minimum width, and that, in turn, would be breaking
    assumptions in the layout machinery several layers up in the widget
    tree.
    
    Signed-off-by: default avatarSergey Bugaev <bugaevc@gmail.com>
    14d66efb
  • Sergey Bugaev's avatar
    Add a test for not collapsing last-item space · 7d84d801
    Sergey Bugaev authored
    Adapted from a real-world case, the content warning of
    https://lea.pet/notes/9lc92xktj5dq3w02
    
     that was breaking layout in the
    Tuba app.
    
    Signed-off-by: default avatarSergey Bugaev <bugaevc@gmail.com>
    7d84d801
  • Matthias Clasen's avatar
    Merge branch 'screaming' into 'main' · 7c65bc71
    Matthias Clasen authored
    Count last-item space toward line width in more cases
    
    See merge request GNOME/pango!706
    7c65bc71
  • Chun-wei Fan's avatar
    pangowin32: Create IDWriteFactory[3|5] objects if possible · 7bb9f55c
    Chun-wei Fan authored
    If we have the dwrite_3.h header, first create the IDWriteFactory3 object,
    which is available from Windows 10 or later, and grab the
    IDWriteFactory5 object (available since Windows 10 Creators' Update) and
    the original IDWriteFactory object from it, if we succeeded in doing so.
    
    If we don't have dwrite_3.h (or IDWriteFactory3 from the system), create
    the IDWriteFactory object as we did before.
    7bb9f55c
  • Chun-wei Fan's avatar
    pangowin32: Allow adding DWrite fontsets to fontmap · 1320b2de
    Chun-wei Fan authored
    Extend the fontmap populate function a bit so that if we have added
    custom DWrite font sets to the IDWriteFontSetBuilder[1] in our font map,
    we could add them to the font collection that we obtained from
    the system.
    
    Note that this does not yet expose any public API for people to use to
    add font files to the fontmap for Windows.
    1320b2de
  • Chun-wei Fan's avatar
    pangowin32: Add fontmap->[get_serial|changed] implementation · 028f06cc
    Chun-wei Fan authored
    We want to support loading custom fonts into a fontmap using DirectWrite
    APIs in place of using AddFontResourceEx(), which DirectWrite will have
    problems using if the FR_PRIVATE flag is being used in the call.
    028f06cc
  • Chun-wei Fan's avatar
    PangoWin32: Split out obtaining font description from DirectWrite · a3eb8bdb
    Chun-wei Fan authored
    This way, we can just call the function directly if we already have an
    IDWriteFont object, instead of going around for obtaining a LOGFONTW from the
    IDWriteFont, and then re-obtaining an IDWriteFont object.
    a3eb8bdb
  • Chun-wei Fan's avatar
    PangoWin32: Make destroying font map items shared · 5e12c804
    Chun-wei Fan authored
    We want to reuse tearing down the items in our PangoWin32FontMap as we
    are going to support loading custom fonts that are supported by
    DirectWrite.
    
    Also make the prefix for our font map object boilerplate
    pango_win32_font_map instead of _pango_win32_font_map.
    5e12c804
  • Chun-wei Fan's avatar
    PangoWin32: Add private API to clear fontmap cache · aaffadca
    Chun-wei Fan authored
    This is modelled after the PangoFcFontMap's implementation, where we
    clear out the font map and reload things with new fonts that are added
    via IDWriteFontSetBuilder(1), and emit the necessary signal and
    notifications, to be used when pango_font_map_changed() is called.
    aaffadca
  • Chun-wei Fan's avatar
    PangoWin32: Add API to load custom font file · ca3cd27e
    Chun-wei Fan authored
    This adds an API for PangoWin32 to add a font file that is supported by
    DirectWrite into the PangoFontMap, for Windows 10 and later.
    
    If DirectWrite is able to load and gather the info on the font file, put it
    into the PangoWin32FontSetBuilder member (that wraps IDWriteFontSetBuilder/
    IDWriteFontSetBuilder1) member of the fontmap, and then inform using
    pango_font_map_changed() which will call the private API in the previous
    commit, which will cause the font map to be reloaded with the system font
    collection plus the font file(s) that were passed in via this API, with the
    needed signals and notifications sent.
    
    The fontmap->changed() vfuncs for PangoWin32/PangoCairo(Win32) is updated
    accordingly, for this reason.
    
    Support for Windows 7/8.x would probably be added later, pending demand
    for such support.
    ca3cd27e
  • Chun-wei Fan's avatar
    README.win32: Convert to MarkDown · 5fb88bf4
    Chun-wei Fan authored
    ...and also update some of the info as appropriate, such as the required Meson
    version, supported build arch and the dependency requirements.
    
    This will make the Windows build instructions easier on the eye.
    5fb88bf4
  • Chun-wei Fan's avatar
    README.win32.md: Make dependency docs more clear · 9bb7ce83
    Chun-wei Fan authored
    Add sections so that one can find info on dependencies easier, and give a
    better outline on how PangoFt2 can be built on Windows, especially when Pango
    is built from scratch (i.e. without any dependencies found other than the
    toolchain and/or Windows SDKs).
    
    Suggested by Mashpoe Dev from issue #774.
    9bb7ce83
  • Luca Bacci's avatar
    Merge branch 'dwrite-custom-font' into 'main' · d3b997a2
    Luca Bacci authored
    Windows: Add API to load uninstalled fonts into fontmap (for Windows 10 and later)
    
    Closes #720
    
    See merge request GNOME/pango!700
    d3b997a2
  • Luca Bacci's avatar
    Merge branch 'win32-build-doc' into 'main' · a1c63892
    Luca Bacci authored
    Improve Windows build documentation
    
    See merge request GNOME/pango!708
    a1c63892
  • Chun-wei Fan's avatar
    pangowin32: Add C++-only private header · f3f6dedc
    Chun-wei Fan authored
    We want to add some commonly used items for using DirectWrite (i.e.
    C++) in a new private header, so that DirectWrite code can use this.
    
    This includes:
     * A release and an addref implementation that checks whether the
       object is NULL and act accordingly.
     * Structure that contained DirectWrite objects in
       pangowin32-dwrite-fontmap.cpp is now here.
    f3f6dedc
  • Chun-wei Fan's avatar
    Add implementation of custom fonts on Windows 7/8.x · 479782cf
    Chun-wei Fan authored
    This adds an implementation of loading fonts from some specified path for
    Windows 7/8.x, to complete the feature that was already added for
    Windows 10 or later.
    
    To make things cleaner, this uses some more C++-specific items that
    wraps the COM interfaces that we need to implement in this case,
    especially that DirectWrite stuff already needs to be done in C++ when we
    are using the Windows SDK.
    479782cf
  • Luca Bacci's avatar
    Merge branch 'dwrite-custom-font-win7' into 'main' · 982a0100
    Luca Bacci authored
    Windows: Add API to load uninstalled fonts into fontmap (For Windows 7/8.x)
    
    See merge request GNOME/pango!707
    982a0100
  • Chun-wei Fan's avatar
    pango/meson.build: Clean up on HarfBuzz · a532ca46
    Chun-wei Fan authored
    We now always find HarfBuzz via pkg-config, so just always include it directly
    under `Requires` in the generated pkg-config file.
    a532ca46
  • Chun-wei Fan's avatar
    build: Improve FreeType2 dependency search on Windows · b12e01a5
    Chun-wei Fan authored
    Fixup the names that we pass into looking for the FreeType dependency, and
    ensure that the pkg-config file for PangoFt2 is generated with the correct
    FreeType entry as it could have been found via pkg-config or CMake.
    b12e01a5
  • Chun-wei Fan's avatar
    build: Clean up FontConfig dependency search · 9cb3b76e
    Chun-wei Fan authored
    We now only look for FontConfig via pkg-config files, as FontConfig nowadays
    can be built quite easily on Visual Studio using Meson, which will generate
    pkg-config files for us.
    9cb3b76e
  • Chun-wei Fan's avatar
    build: Clean up Cairo dependency search and checks · debf78cc
    Chun-wei Fan authored
    Cairo 1.17.x is now built on Visual Studio using Meson, meaning that pkg-config
    files are always around, plus 1.17.x contained many improvements, fixes and
    features for Windows, so let's just limit looking for Cairo using pkg-config or
    subprojects.
    
    If we are building PangoFt2, also always check that Cairo contains FreeType and
    FontConfig support (cairo-ft may or may not contain FontConfig support), or
    if building Cairo as a subproject, build it with FreeType and FontConfig
    enabled.
    
    Consequently, this will simplify our checks on features that are enabled in
    Cairo.
    debf78cc
  • Chun-wei Fan's avatar
    build: Use hb-directwrite more on Windows · 0b488330
    Chun-wei Fan authored
    As we are using more of DirectWrite in PangoWin32, it makes sense for us to use
    hb-directwrite also when we are (unlikely) not enabling Cairo support for the
    build, to reduce differences that may arise when we use GDI interop in this
    process.
    
    So, from this point, we use hb-gdi (or its raw form) only when we are enabling
    Cairo support and do not have DirectWrite enabled in the Cairo build, or
    HarfBuzz is built without DirectWrite support.
    0b488330
  • Chun-wei Fan's avatar
    build: Sort out HarfBuzz and FreeType build options · c62aba85
    Chun-wei Fan authored
    ...when one or more of them is being built as subproject(s). This will:
    
    * Ensure that FreeType support is enabled for HarfBuzz if building PangoFt2
    * Ensure that FreeType does not build with HarfBuzz support if HarfBuzz is
      also built as a subproject, so that things will build and link properly.
    c62aba85
  • Chun-wei Fan's avatar
    README.win32.md: Update build documentation · 14c499ad
    Chun-wei Fan authored
    Building FontConfig support with Cairo, HarfBuzz and FreeType as subprojects
    has been simplified in the build files, so let people know that options for
    building these will no longer need to be specified for configuring the build.
    14c499ad
  • Matthias Clasen's avatar
    viewer: Make hint-metrics values match cairo · e31d396f
    Matthias Clasen authored
    Make the order of the enum values match the order in cairo,
    otherwise casting goes badly. This bug must have been around
    for decades :(
    e31d396f
  • Matthias Clasen's avatar
    Merge branch 'fix-hint-metrics-option' into 'main' · 7ed29346
    Matthias Clasen authored
    viewer: Make hint-metrics values match cairo
    
    See merge request GNOME/pango!714
    7ed29346
  • Matthias Clasen's avatar
    Merge branch 'meson-win32' into 'main' · 3f7c37ba
    Matthias Clasen authored
    Clean up build files
    
    See merge request GNOME/pango!709
    3f7c37ba
  • Matthias Clasen's avatar
    Merge branch 'zbrown/family-props' into 'main' · 5379faf5
    Matthias Clasen authored
    family: expose name etc as properties
    
    See merge request GNOME/pango!699
    5379faf5
  • Matthias Clasen's avatar
    1.51.2 · 54c5f4ec
    Matthias Clasen authored
    54c5f4ec
  • Matthias Clasen's avatar
    Improve formatting of font sizes · d489fc8c
    Matthias Clasen authored
    When serializing font descriptions, format the font size only
    to the number of decimals needed to reconstruct the same Pango
    units.
    
    Code inspired by similar facilities in fonttools.
    
    Affected tests have be updated.
    d489fc8c
  • Matthias Clasen's avatar
    Merge branch 'font-size-formatting' into 'main' · 771dcfec
    Matthias Clasen authored
    Improve formatting of font sizes
    
    See merge request GNOME/pango!717
    771dcfec
  • Matthias Clasen's avatar
    Add pango_font_map_reload_font · f636fce6
    Matthias Clasen authored
    This is a new api to go from a font to a modified copy and be
    somewhat efficient about it. The modified font will be identical
    to the original in all respects except possibly for size,
    variations and cairo font options.
    
    Test included.
    f636fce6
  • Matthias Clasen's avatar
    Merge branch 'scale-font' into 'main' · b9476666
    Matthias Clasen authored
    Add pango_font_map_reload_font
    
    See merge request GNOME/pango!716
    b9476666
  • Matthias Clasen's avatar
    1.52.0 · fed7be51
    Matthias Clasen authored
    fed7be51
  • Amin Bandali's avatar
    New upstream version 1.52.0+ds · 36ac111c
    Amin Bandali authored
    36ac111c
Loading
Loading