Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1005291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:16:16+00:00 2026-05-16T08:16:16+00:00

I am developing a web service that renders characters using the PHP GD extension,

  • 0

I am developing a web service that renders characters using the PHP GD extension, using a user-selected TTF font.

This works fine in ASCII-land, but there are a few problems:

  1. The string to be rendered comes in as UTF-8. I would like to limit the list of user-selectable fonts to be only those which can render the string properly, as some fonts only have glyphs for ASCII characters, ISO 8601, etc.

  2. In the case where some decorative characters are included, it would be fine to render the majority of characters in the selected font and render the decorative characters in Arial (or whatever font contains the extended glyphs).

It does not seem like PHP-GD has support for querying the font metadata sufficiently to figure out if a character can be rendered in a given font. What is a good way to get font metrics into PHP? Is there a command-line utility that can dump in XML or other parsable format?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:16:17+00:00Added an answer on May 16, 2026 at 8:16 am

    I ended up using the TTX utility to dump font metrics. I could then inspect the resulting .ttx files and look at the character->glyph map. I did this manually, but automatic parsing of the XML files is possible.

    An example GNU Makefile which generates the .ttx files from a set of TrueType fonts in the same directory:

    all: fontmetrics
    
    fontmetrics: $(patsubst %.ttf,%.ttx,$(wildcard *.ttf))
    .PHONY: fontmetrics
    
    clean:
        rm -f *.ttx
    
    %.ttx: %.ttf
        ttx -t cmap $<
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 503k
  • Answers 503k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Yes, this is not possible. Application settings are serialized using… May 16, 2026 at 2:49 pm
  • Editorial Team
    Editorial Team added an answer I have never seen Rails scaffold-generated view code used in… May 16, 2026 at 2:49 pm
  • Editorial Team
    Editorial Team added an answer If I'm interpreting what you're saying correctly, you want to… May 16, 2026 at 2:49 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I´m developing a web service that access a SQL Express database, it works very
I'm developing a web service that needs to return results in both french and
I am currently developing a web service that is configured to receive SMS text
I'm developing a Jboss web service that requires to access files which are in
I'm currently developing a WCF REST Web Service that will be running on Microsoft
Currently we are developing an ASMX, ASP 2.0, IIS 7 web service that does
I'm developing a web service whose methods will be called from a dynamic banner
I got a web service that I protect with basic authentication and use ssl.
I've had the thrill recently of developing web service applications. Most of my experience
I'm developing a Grails (Version 1.3.3) Web-Application using the Grails Spring-Security Plugin, Spring-Security-Core-1.0.1 (which,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.