```[ \t\r\n]``` is equivalent to ```\s``` according to MDN (https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/RegExp).

Additionally, these two lines can be regexp-fu'ed into:
```fontFamilyName = fontFamilyName.replace(/^\s+(.*?)\s*$/,"$1")```
Note the non-greedy any-char match in the bracket. This is necessary to stop it from eating up the trailing whitespace. I'm not sure if that is easier to read than your code however, so please feel free to leave it unchanged if you prefer what you've written :)