Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing problem rendering Lato font #3463

Merged
merged 3 commits into from
May 4, 2015
Merged

Fixing problem rendering Lato font #3463

merged 3 commits into from
May 4, 2015

Conversation

xavijam
Copy link
Contributor

@xavijam xavijam commented May 4, 2015

We have a really big problem rendering Lato font with our font generated files. So @matallo has suggested to use webfontloader for loading them from Google, and if they aren't loaded, load the local ones (perfect for on-premise case). I feel it is a good option, what do you think?

@CartoDB/frontend

Fixes #3461.

@xavijam
Copy link
Contributor Author

xavijam commented May 4, 2015

I haven't done anything yet, this it for discussion.

@Cartofante
Copy link
Collaborator

Frontend tests were OK 👍 (details)

@xavijam
Copy link
Contributor Author

xavijam commented May 4, 2015

@matallo approach done, @viddo could you check it?

var latoCSSUrl = cdb.config.get('assets_url') + '/stylesheets/fonts.css';
var opts = {};

if (customInstall) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

custom install, onpremise,...

cc @javisantana

@Cartofante
Copy link
Collaborator

Frontend tests were OK 👍 (details)

@viddo
Copy link
Contributor

viddo commented May 4, 2015

Solution itself looks legit, but why is it that the font loading fails when loaded "locally" (CDN?) in the first place?

@xavijam
Copy link
Contributor Author

xavijam commented May 4, 2015

I don't get you @viddo sorry. fontinactive is an event triggered when the fonts haven't been loaded, then we load the local ones. They only are loaded from the beginning if the editor is a "custom_install" type.

@Cartofante
Copy link
Collaborator

Frontend tests were OK 👍 (details)

@alonsogarciapablo
Copy link
Contributor

I'm personally missing some context here too. As @viddo said, solution looks good, but I'm not sure what the real problem is.

@matallo
Copy link
Contributor

matallo commented May 4, 2015

I find this awesome, good job @xavijam

xavijam added a commit that referenced this pull request May 4, 2015
Fixing problem rendering Lato font
@xavijam xavijam merged commit 860df50 into master May 4, 2015
@xavijam xavijam deleted the issue-3461 branch May 4, 2015 13:17
@xavijam
Copy link
Contributor Author

xavijam commented May 4, 2015

@alonsogarciapablo We had problems rendering Lato font using it locally, before being loaded, weird characters appeared in the texts with that font applied (unfortunately i don't have an screenshot right now). After checking what we do in CartoDB website, I feel this way is way better, and without forgetting open source and offline users.

@Cartofante
Copy link
Collaborator

Frontend tests were OK 👍 (details)

@alonsogarciapablo
Copy link
Contributor

@xavijam I guess you're referring to this:

image

Thanks for the context and the quick fix!

@xavijam
Copy link
Contributor Author

xavijam commented May 4, 2015

Yep, that thing :(

On 4 May 2015 at 15:26:18, Pablo Alonso (notifications@github.com) wrote:

@xavijam I guess you're referring to this:

Thanks for the context and the quick fix!


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lato font rendering is not working properly
5 participants