Well, I don't have any experience with the Barcode font, you could try:
font.canDisplay('a')
That returns true if the font has a glyph for that character; false otherwise. But since I'm not familiar with Barcodes, you would have to supply a character that Barcodes can't read but most other Fonts can. Almost any displayable character will, so long as the Barcode has no such equivalent.
Hope that helps