Jump to content
Sign in to follow this  
fritzfeger

How to add the primary font (any custom font) to the Twitter Widget (java script

Recommended Posts

fritzfeger

When I set fonts in the typography panel, the Twitter Widget, as taken from twitter.com, resources, overrides these settings and uses some sans font, which looks kind of displaced in my serif layout (while the rest of the widget looks quite nice to my reddened eyes). Anything I could insert into the .js? Here's the code:

<script src="http://widgets.twimg.com/j/2/widget.js"></script>
	<script>
	new TWTR.Widget({
	  version: 2,
	  type: 'profile',
	  rpp: 5,
	  interval: 6000,
	  width: 'auto',
	  height: 380,
	  theme: {
	    shell: {
	      background: '#dddddd',
	      color: '#777777'
	    },
	    tweets: {
	      background: '#ffffff',
	      color: '#000000',
	      links: '#700000'
	    }
	  },
	  features: {
	    scrollbar: false,
	    loop: false,
	    live: true,
	    hashtags: true,
	    timestamp: true,
	    avatars: false,
	    behavior: 'all'
	  }
	}).render().setUser('sabinedoering').start();
	</script>

Share this post


Link to post
Share on other sites
kastelic

Have you tried adding

font-family: 'sans-serif',

to one of the lines? Or maybe target it in your custom CSS with the same type of rule? A link to your site could help us get you that code working.

Share this post


Link to post
Share on other sites
fritzfeger

Ok, I'm using the Google font Old Standard TT (available in the Typography section of PageLines settings) throughout the site and I'd love to have the Twitter widget also using this. The site is http://sabinedoering.de Thank you! Fritz

Share this post


Link to post
Share on other sites
cmunns

Dont change any js just use the CSS classes already applied. Add this to your themes custom code - custom css area ` body .twtr-widget .twtr-tweet-wrap { font-family: "Old Standard TT", "Times New Roman", Times, serif; } `

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×