Xway b1 - bug: User error can cause Xway to create invalid font styles


Tim Plumb
 

If you leave the Alternative Fonts field empty in the Fonts view Xway creates an invalid font-family style.
For example: font-family: myfont, ,cursive
Note the empty font reference in the list.


Jeremy Hughes
 

Hi Tim,

Can you give me some steps, because I'm having trouble reproducing this?

1. Choose "Other..." from a Font menu
2. Type "Palatino" as the Font Name
3. Leave the Alternative Fonts field empty
4. >> The New Font dialog displays "Palatino, serif"
5. Preview
6. >> Xway outputs "font-family:Palatino,serif"

Jeremy


Jeremy Hughes
 
Edited

Sorry - I see that you said Fonts view rather than New font dialog.

I can reproduce the issue there, but steps are always helpful!

Jeremy


Tim Plumb
 

1. Choose "View fonts" from the tool bar
2. Click New...
3. Enter McLaren for the Font Name
4. Add Times to the Alternative Fonts field
5. Select Cursive from the Font Type menu
6. Enter the following URL for a hosted font
https://fonts.googleapis.com/css?family=McLaren&display=swap
7. Preview
8. >> Xway outputs "font-family: McLaren,Times,cursive"
9. Return to view fonts from the tool bar
10. Select the McLaren entry
11. Remove the text from the Alternative Fonts field
12. Preview
13. >> The font is not rendered in McLaren as the font-family reference is now broken and Way outputs:  "font-family: McLaren,,cursive"

A bit more involved that I'd first imagined as the issue looks like it is with the entry editing rather than the creation.
For extra points note that Xway won't render the font in the design view but does OK when previewed. Maybe there is a fix for that.

Incidentally how do I delete font sets? I can't appear to delete them and now I've got a shed load of them while testing this! :-)


Jeremy Hughes
 

Thanks for the steps!

Xway won't render the font in the design view
It will display the font if you download it from Google and put it in your fonts folder.

how do I delete font sets?
You don’t need to delete fonts. Unless you set them to be permanent they will be automatically deleted when they are no longer needed - which means when they are no longer used in the document or on the document’s undo stack.

Even if they are no longer needed in the current document, they might be needed if you undo to a previous stage of the document. There is a note about this in the Xway User Guide:

Note: Temporary fonts are not always removed immediately. If they are not used within the document, but are applied to objects that exist in the undo stack (and can be brought back by undoing or redoing), they are retained until they are no longer needed. Fonts that are used by objects in the undo stack, but are not used in the document, will be removed when the document is saved and reopened.

Jeremy


Jeremy Hughes
 

Xway won't render the font in the design view
It will display the font if you download it from Google and put it in your fonts folder.
For more detail see the “Working with fonts” section in the User Guide.

Jeremy