Skip to content

fontsToJson does not handle possible escapes #38

@RoryDuncan

Description

@RoryDuncan

Issue arose from non-english character sets being unable to load fonts from the filesystem—due to possible escaping string-building in the host file.

Utilize json2 to fix the issue.

Log

===========

message: Failed to fetch fonts from filesystem

===========

stack trace: Error: Failed to fetch fonts from filesystem
    at update (file:///C:/Program%20Files%20(x86)/Common%20Files/Adobe/CEP/extensions/com.fusefonts.extension/client/scripts/bundle.js:2563:52)
    at update (file:///C:/Program%20Files%20(x86)/Common%20Files/Adobe/CEP/extensions/com.fusefonts.extension/client/scripts/bundle.js:1061:17)
    at Object._set [as set] (file:///C:/Program%20Files%20(x86)/Common%20Files/Adobe/CEP/extensions/com.fusefonts.extension/client/scripts/bundle.js:2563:39)
    at typefaceRepository.load.then.catch (file:///C:/Program%20Files%20(x86)/Common%20Files/Adobe/CEP/extensions/com.fusefonts.extension/client/scripts/bundle.js:3062:24)
    at <anonymous>

===========

device details: 
	Photoshop Version: 21.2.3
	CEP Version: 9.4.0
	OS: Windows 7 64-bit
	UI Display Scale: 1

===========

Runtime logs: 
1	[user settings]
	info:	Loading
2	[app]
	info:	JSON parsed
		[object Object]
3	[user settings]
	info:	Changed
		{"applyTypeface":true,"panelSplit":20,"listView":true,"fontSize":10,"previewFont":false}
4	[typeface service]
	info:	Loading...
5	[typeface service]
	info:	Loading from local storage
6	[typeface service]
	warning:	Typefaces not loaded from local storage
7	[fonts service]
	info:	Loading
8	[fonts service]
	warning:	Fonts not in local storage
9	[fonts service]
	info:	Loading fonts from file system
10	[app]
	error:	Failed to parse JSON
		[object Object]
11	[error service]
	info:	Caught Runtime Error
		Failed to fetch fonts from filesystem

===========

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions