<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>186366</bug_id>
          
          <creation_ts>2018-06-06 15:48:51 -0700</creation_ts>
          <short_desc>[Cocoa] Allow app-bundled fonts to work in WKWebView</short_desc>
          <delta_ts>2019-12-03 14:55:48 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Text</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Fraser (smfr)">simon.fraser</reporter>
          <assigned_to name="Brady Eidson">beidson</assigned_to>
          <cc>ap</cc>
    
    <cc>mmaxfield</cc>
    
    <cc>sam</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>yousuke.igarashi</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1430604</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-06-06 15:48:51 -0700</bug_when>
    <thetext>Trying to load a custom font (which starts off encrypted) by creating a CGFontRef with CGFontCreateWithDataProvider(), then registering it in the app with CGFontManagerRegisterGraphicsFont().

The CSS landed in the WKWebView references the font just via font-family, but this doesn&apos;t work.

We tried adding the font to the info.plist (under &quot;Fonts provided by application&quot;) but this didn&apos;t&apos; work (not clear if this is the PostScript name or the full name).

It seems like a 3rd party app should be able to do this. What&apos;s the best way?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434203</commentid>
    <comment_count>1</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2018-06-18 15:37:03 -0700</bug_when>
    <thetext>iOS or macOS?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434206</commentid>
    <comment_count>2</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2018-06-18 15:40:15 -0700</bug_when>
    <thetext>Are you sure you don&apos;t mean CTFontManagerRegisterGraphicsFont?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434209</commentid>
    <comment_count>3</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2018-06-18 15:45:58 -0700</bug_when>
    <thetext>CTFontManagerRegisterGraphicsFont only registers it for the current process.

On macOS, there are tons of ways to register a font for multiple processes. On iOS, the current only way is with a configuration profile.

I do agree that it should be easier for an iOS application to register a font for its own process and the associated web processes, but not for unrelated other app processes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434608</commentid>
    <comment_count>4</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-06-19 15:31:10 -0700</bug_when>
    <thetext>iOS. And I do mean CGFontManagerRegisterGraphicsFont.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434804</commentid>
    <comment_count>5</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2018-06-20 08:39:12 -0700</bug_when>
    <thetext>Oh, maybe I did mean CTFontManagerRegisterGraphicsFont(). I was confused by the fact that it takes a CGFontRef.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1434934</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-06-20 16:50:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/41310405&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1435015</commentid>
    <comment_count>7</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2018-06-20 21:28:48 -0700</bug_when>
    <thetext>&lt;rdar://problem/33725014&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1436668</commentid>
    <comment_count>8</comment_count>
    <who name="Myles C. Maxfield">mmaxfield</who>
    <bug_when>2018-06-26 14:34:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/20244953&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>