Giter Site home page Giter Site logo

Ubuntu font bug about clientjs HOT 7 CLOSED

jackspirou avatar jackspirou commented on August 22, 2024
Ubuntu font bug

from clientjs.

Comments (7)

jackspirou avatar jackspirou commented on August 22, 2024

What do you think of the new getCustomFingerprint method? Would it solve your need by removing Ubuntu fonts? Or maybe you could parse out the particular font your having an issue with?

getCustomFingerprint takes any number of data points you could pass to it as strings. It will even take data points outside of what ClientJS makes available.

You can find it here: http://clientjs.jacks.io/#Fingerprint-getCustomFingerprint

Let me know what you think.

from clientjs.

jackspirou avatar jackspirou commented on August 22, 2024

@damonsson any thoughts?

from clientjs.

damonsson avatar damonsson commented on August 22, 2024

Sorry for long no response. New method is nice feature, but not solve problem if I want getFonts (which is most unique) to generated id.
I have 2 VPS and 1 local server. When I test getFingerprint on Your demo site, localhost and 1 VPS- on all this site I have same Fingerprint ID, but on 2 VPS (same distibution as 1 VPS Ubuntu 14.04.3 LTS) I have different id. I debug why, and I saw that on 2 VPS I have "Ubuntu" in own fonts from getFonts().
I have no idea why, probably that is server configuration problem, but configuration is default.
So if You don't need use and compare fingerprint id between multiple servers all workings good.
I think that good solution to this bug, will be add to documentation info about this possibility or remove "Ubuntu" from fontArray in getFonts().

from clientjs.

jackspirou avatar jackspirou commented on August 22, 2024

So after a little googling it looks like Ubuntu is a valid font family http://font.ubuntu.com/ and others host it as a font as well http://www.fontsquirrel.com/fonts/ubuntu.

From what you see on your end is it fair to say the Ubuntu font is the same font above?

If so I think we add documentation as you suggested. Very strange for it to be erratically installed from the same Ubuntu 14.04.3 LTS. Maybe it was different distribution images?

from clientjs.

damonsson avatar damonsson commented on August 22, 2024

I'm not sure about distribution images, because I don't have all privileges to VPS. Yes I think a some info in documentation will be helpful for another in feature with same problem.

Please check

  1. Your demo site (font Ubuntu not exist- that is real behavior)
  2. VPS - http://bit.ly/1OjLQpj (font Ubuntu not exist- that is real behavior)
  3. VPS - http://bit.ly/1IlbeJ1 (font Ubuntu surprising exist [BUG]) (fingerprint id will be same, because I customize function by removing Ubuntu from fontArray in getFonts())

Code to console:

var client = new ClientJS();
var font = "Ubuntu";
var isFont = client.isFont(font);
console.log(isFont);

And I'm sure that I don't have Ubuntu font on my system, Utsaah is only one for U letter:
http://prntscr.com/9h0o8c

from clientjs.

jackspirou avatar jackspirou commented on August 22, 2024

@damonsson thanks for the live examples, very helpful.

After taking a look and running the code you provided in the console I can reproduce the issue. Also when I run client.getFonts() I get a list of fonts that don't contain the font Ubuntu, yet your code still returns true for that one site. I don't know yet exactly what is going on, but there must be some difference between both sites. I'll see if I can find something to explain the behavior we are witnessing.

Thanks again for following up on this issue and your patience as we debug it.

PS. Im wondering if this might be related to #17 in anyway...

from clientjs.

jackspirou avatar jackspirou commented on August 22, 2024

@damonsson after thinking I was losing my mind for a bit, I found the issue and it was pretty obvious!

http://bit.ly/1IlbeJ1 is loading the Ubuntu font into the browser from google fonts 😅

Line 15 of your source has:

<link href='//fonts.googleapis.com/css?family=Ubuntu:100,300,400,500,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>

If you don't want Ubuntu to show up as a font, don't load Ubuntu from google fonts :)

It does bring up an interesting question around fonts loaded via a page vs fonts installed on a client or client browser. Not sure how that detection would work. If you think this is a feature that is needed or something we should look into please open a different issue.

Hope that helps!

from clientjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.