- 
                Notifications
    
You must be signed in to change notification settings  - Fork 875
 
Fix emoji font embedding in PDF generation #10678
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
                
     Merged
            
            
          
      
        
          +13
        
        
          −0
        
        
          
        
      
    
  
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    Co-authored-by: yufeih <511355+yufeih@users.noreply.github.com>
Co-authored-by: yufeih <511355+yufeih@users.noreply.github.com>
Co-authored-by: yufeih <511355+yufeih@users.noreply.github.com>
Co-authored-by: yufeih <511355+yufeih@users.noreply.github.com>
      
          
Copilot
AI
        changed the title
[WIP] [Bug] When using 
Fix emoji font embedding in PDF generation
      May 21, 2025 
    
  👍 emoji icon. docfx failed to embed relating font.    
          Copilot finished work on behalf of 
  yufeih 
    May 21, 2025 09:40     
    
| 
           @copilot revert all ur existing changes, install   | 
    
Co-authored-by: yufeih <511355+yufeih@users.noreply.github.com>
          
 I've reverted all the code changes and updated the CI workflows to install  
 The changes are in commit 12fb85b.  | 
    
    
          Copilot finished work on behalf of 
  yufeih 
    May 27, 2025 07:27     
    
  This was referenced Oct 24, 2025 
      
  This was referenced Oct 27, 2025 
      
  This was referenced Nov 3, 2025 
      
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Problem
When using emoji characters like 👍 in markdown documents, DocFX failed to embed the necessary fonts in the generated PDF files. This resulted in "T3_font" appearing in Adobe Acrobat reader's property page, and these characters displaying incorrectly depending on the environment.
Solution
This PR modifies the PDF generation process to properly handle emoji characters by:
Automatically detecting and using emoji fonts if available on the system:
Adding an environment variable (
DOCFX_PDF_EMOJI_FONT) to specify a custom emoji font path:Adding diagnostic info to the PDF metadata to identify which emoji font was used
This change ensures that emoji characters are properly rendered in generated PDFs across different operating systems without requiring manual intervention.
Fixes #10484.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
cdn.fwupd.org/usr/bin/fwupdmgr refresh(dns block)crl3.digicert.comdotnet build(dns block)crl4.digicert.comdotnet build(dns block)dot.netwget REDACTED -O dotnet-install.sh(dns block)download.visualstudio.microsoft.comwget REDACTED -O dotnet-sdk.tar.gz(dns block)ocsp.digicert.comdotnet build(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)s.symcb.comdotnet build(dns block)/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js(dns block)s.symcd.comdotnet build(dns block)ts-crl.ws.symantec.comdotnet build(dns block)ts-ocsp.ws.symantec.comdotnet build(dns block)www.microsoft.comdotnet build(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.