question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom font-family in hosted fields?

See original GitHub issue

I’m currently working on a project, where we’re using Braintree Hosted Fields for our checkout fase. Really neat tool.

I do have an issue using my custom font-family, though. Is it at all possible to specify font-family based on a font imported in my stylesheets, or is it only possible to use system fonts? I’ve tried the monospace-font from your example in the docs, which works fine. But my paid font (Brown Pro) isn’t working.

I also noticed, that if i inspect the input element in the browser, the font-family value is without quotation marks, event if i try adding them like

'font-family': '\"BrownPro\"'

So my question in short - is it possible at all to use custom fonts, and if so, (how) am i doing it wrong?

Best regards

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:30 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
ngrymancommented, Nov 26, 2018

FYI Stripe Elements does support custom fonts via cssSrc like mentioned by @alovak: https://stripe.com/docs/stripe-js/reference#stripe-elements while still supporting SAQ-A. Any chance you could revisit this issue given that information? Thanks!

2reactions
crookedneighborcommented, Nov 28, 2018

For now, this feature is still not on our roadmap, but I will bring it up with the team again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

braintree-web/hosted-fields - Documentation
An object that represents CSS that will be applied in each hosted field. This object looks similar to CSS. Typically, these styles involve...
Read more >
Styling | JavaScript - Braintree Developer Documentation
Hosted Fields defers as much of the styling of field components to you as possible. ... Styling a specific field // Custom web...
Read more >
Hosted Fields Details and Examples
Styling Hosted Fields give you complete control over your form style and layout. ... 'font-size': '14px', // Custom web fonts are not supported....
Read more >
How To Load and Use Custom Fonts with CSS | DigitalOcean
Then, you will use a font-hosting service, Google Fonts, to find, select, and load custom fonts onto your page. Lastly, you will load...
Read more >
How to Use Google Fonts and Custom Fonts in Jotform
Open the Form Designer panel in Form Builder. Go to the Styles tab. Paste your Google Fonts import code in the Inject Custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found