Skip to content

drawBorders() problem with text-object #44

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

Closed
Kienz opened this issue Aug 15, 2011 · 2 comments
Closed

drawBorders() problem with text-object #44

Kienz opened this issue Aug 15, 2011 · 2 comments
Labels

Comments

@Kienz
Copy link
Collaborator

Kienz commented Aug 15, 2011

Do you have a solution for this problem (see screenshot)? The border lines are not set correctly for text-objects.
I used the latest version of all.js and the font delicous_500 from the project page.

With other fonts i have the same problem.

Thanks.

@kangax
Copy link
Member

kangax commented Aug 17, 2011

Yeah, that's a long standing issue with Cufon rendering. In our project where we use fabric, I worked around it by having a separate "font_definitions" file, which looks like this:

var fontDefinitions = {
  'Myriad_Pro':                   120,
  'Capitalist':                   70,
  'Times_New_Roman':              120,
  ...
};

Then in the app we're doing this:

for (var prop in fontDefinitions) {
  if (Cufon.fonts[prop.toLowerCase()]) {
    Cufon.fonts[prop.toLowerCase()].offsetLeft = fontDefinitions[prop];
  }
}

I'll try to think of a good way to get rid of this crutch...

@Kienz
Copy link
Collaborator Author

Kienz commented Aug 18, 2011

It works!! Thanks a lot.

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

No branches or pull requests

2 participants