Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-13060

Split font engine into font drivers (the Big Font Rewrite)

    XMLWordPrintable

Details

    • Epic
    • Resolution: Unresolved
    • Major
    • None
    • None
    • None
    • Font engine rewrite

    Description

      <gadamopoulos> windows don't use lists
      <gadamopoulos> windows use a hashtable
      <gadamopoulos> a global one and one per process (that's the PFT)
      <gadamopoulos> each font file is cached in the PFT (the font file is the PFF)
      <gadamopoulos> and each font file contains multiple faces that are stored in the PFF (the face is the PFE)
      <gadamopoulos> PFFs do not have handles
      <gadamopoulos> but have timestamps as unique identifiers 
      <gadamopoulos> PFEs have handles
      <gadamopoulos> all these begin with P because they refer to the physical fonts
      <gadamopoulos> there are logical fonts (the LFONT) and the real deal (RFONT)
      <gadamopoulos> in trunk these two are entangled
      <gadamopoulos> the LFONT has handles meaning that its lifetime is set by its handles
      <gadamopoulos> the RFONT doesn't have handles but it dies when the DC object it is associated to dies
      <gadamopoulos> the LFONT is more like what the application wishes to use
      <gadamopoulos> the RFONT is what ends up in the DC
      <gadamopoulos> and the RFONT references a PFE
      <gadamopoulos> and the LFONT caches a HPFE
      <gadamopoulos> in ros the LFONT has a pointer to what should be called an RFONT
      <gadamopoulos> but our RFONT doesn't have all teh info it needs so we always pass the LFONT around
      <gadamopoulos> and we don't have something that resembles a PFE because we overly rely on freetype to do the work instead of querying the data of the fontfile and doing the work ourselves afterwards
      <gadamopoulos> this is important because we don't support font drivers
       
      <gadamopoulos> Mark_Jansen: timo has implemented two font drivers
      <gadamopoulos> and a small part of the code that calls the font driver
      <gadamopoulos> this is the font driver:  https://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/drivers/video/font/ftfd/
      <gadamopoulos> and this is the interface it implements: https://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/font/ftfd/enable.c?revision=66588&view=markup#l10
      <gadamopoulos> ftfd stands for freetype font driver
       
      <gadamopoulos> and here is the code that calls it (not complete though): https://svn.reactos.org/svn/reactos/branches/GSoC_2011/GdiFontDriver/subsystems/win32/win32k/font/fntdrvsup.c?revision=56062&view=markup
       
      <gadamopoulos> search for pldev in the last file I pasted to see 
      <gadamopoulos> see the whole font folder where the fntdrvsup exists. it is a partial rewrite that was never completed
      <gadamopoulos> oh Mark_Jansen, another reason this is important to complete is that right now graphics drivers can't use hardware acceleration to improve the speed we render text

      Steps to be done:

      • Identify individual tasks that can be completed
      • Create sub-tasks for these individual tasks

      Attachments

        Issue Links

          Activity

            People

              bug zilla Bug Zilla
              learn_more Mark Jansen
              Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: