Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P poppler
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 664
    • Issues 664
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 46
    • Merge requests 46
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • poppler
  • poppler
  • Issues
  • #23
Closed
Open
Issue created May 19, 2016 by Bugzilla Migration User@bugzilla-migration

[patch] add support for subpixel rendering support for cairo backend

Submitted by Yichao Zhou

Assigned to poppler-bugs

Link to original bug (#95485)

Description

Created attachment 123900 proposed patch

The patch poppler-subpixel.patch provides a new function called poppler_page_support_subpixel_rendering for glib/cairo backend for poppler. This function checks whether a PDF page could be subpixel-rendered. The reason that subpixel rendering is not implemented in a PDF viewer is that glyphs subpixel rendering cannot easily support transparent background, i.e., the background color much be known when the glyphs are rendered. By default, PDF has a transparent background. In most case, one can fill white to the background before the rendering of glyphs to workaround this problem. However, PDF file format has a feature called blend modes. Example can be downloaded from [https://github.com/mozilla/pdf.js/blob/master/test/pdfs/blendmode.pdf]. Some blend modes will generate different results when drawing on transparent or white background. Therefore, filling color into background is incorrect in this case. The new added function poppler_page_support_subpixel_rendering checks whether it is safe to fill some color into background by traversing current page and check whether transparent background and colored background are distinguishable by checking all the blend modes used before rendering. If it returns true, the application can call cairo_paint to fill the background and cairo_font_options_set_antialias to enable the subpixel rendering for cairo.

See glib/demo/render.c for an example how to use the subpixel rendering feature.

Patch 123900, "proposed patch":
poppler-subpixel.patch

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking