gravity-pdf icon indicating copy to clipboard operation
gravity-pdf copied to clipboard

Using the characters ( and ) in the font name will generate an invalid CSS Example

Open jakejackson1 opened this issue 2 years ago • 0 comments

Description If adding a new font via GPDFAPI::add_font() and it includes the character ( or ) the developer template sample will not display with the correct reference name.

Step To Reproduce Steps to reproduce the behavior:

  1. Add a font with GPDFAPI::add_font()
  2. Open the Font Manager
  3. Select one of the fonts
  4. Open the developer code sample in the right pane

Expected behavior The font family reference is correct

Screenshots Screen Shot 2022-05-10 at 10 10 06 am

Additional context It isn't possible to get into this state through the UI as we prevent non-alpha numeric characters in the font name. Let's allow this character in the font name but strip it when generating the font key.

jakejackson1 avatar May 10 '22 00:05 jakejackson1