It's not possible to just use the name Arial, because Arial isn't listed as one of the 14 standard Type 1 fonts (whereas Courier is one of those 14).
If you want to use Arial, you'll always need to refer to the arial.ttf file, and yes, that can mean that you need to provide c:/windows/fonts/arial.ttf
as a path.
If you want to make your application platform-independent, you can ship the font with your code as a resource, and use the path to that resource.
Another solution, is to use the FontFactory
and to register all fonts. Note that the initial call to register fonts can take some time, as FontFactory
will search your hard disk for as many fonts as it can find looking at directories that may contains font files (depending on the OS). Take a look at the FontFactoryExample and experiment with the register()
, registerDirectory()
and registerDirectories()
methods.