newcoder1010 Posted July 13, 2016 Share Posted July 13, 2016 Hi, I like to make css font similar to image. I did apply some css font family but could not get close. Can you please help me how should I write css to make the font similar to the image? Thanks. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 13, 2016 Share Posted July 13, 2016 Did you download font files to website folder? Link to comment Share on other sites More sharing options...
newcoder1010 Posted July 13, 2016 Author Share Posted July 13, 2016 sorry. I am not sure what you mean by that. I did not download anything. I simply want to apply css to a p class. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 13, 2016 Share Posted July 13, 2016 Depends! IF you are using a web safe font (http://www.w3schools.com/cssref/css_websafe_fonts.asp) or NOT. IF NOT! you would have to download OR link to font files (google fonts), related to different formats of boldness, italic etc which would work in all O/S browsers, else you have to rely on the user to have your specific font on their operating system to see the same result see http://www.w3schools.com/css/css3_fonts.asp Link to comment Share on other sites More sharing options...
newcoder1010 Posted July 17, 2016 Author Share Posted July 17, 2016 I just applied this code and I was able to see the result in desktop but when I view it mobile device, I dont see the styling. @media only screen and (max-width: 768px) p.investor { font-family: cursive; font-weight: bold;} Link to comment Share on other sites More sharing options...
dsonesuk Posted July 17, 2016 Share Posted July 17, 2016 Nothing you have given us tells us if you have properly linking to 'cursive' font from your website or font site? Your desktop may have 'cursive' font on its operating system so it will show when viewed through browser, a mobile will be less likely to have this font on its operating system so it will use default browser alternative font. This is why you should download to your website folder or link to font website files so it does not rely on operating system having required font. Link to comment Share on other sites More sharing options...
Ingolme Posted July 17, 2016 Share Posted July 17, 2016 cursive is one of the generic font types. It works on any device regardless of what fonts are installed. The five generic font types: serif, sans-serif, monospace, cursive, fantasy. https://www.w3.org/TR/CSS2/fonts.html#generic-font-families Link to comment Share on other sites More sharing options...
dsonesuk Posted July 17, 2016 Share Posted July 17, 2016 NO! IT! IS IT IS ABSOLUTELY NOT! REGARDLESS OF DEVICE OR OPERATING SYSTEM YOU CANNOT SAY THAT! THAT IS UNTRUE! Link to comment Share on other sites More sharing options...
Ingolme Posted July 17, 2016 Share Posted July 17, 2016 I just linked to the W3C specification. Do you disagree with the W3C? Link to comment Share on other sites More sharing options...
dsonesuk Posted July 18, 2016 Share Posted July 18, 2016 The cursive font is usually limited to one specific type, and not supported in other devices browsers otherthan maybe mac, pc desktops. There is a w3c test page (dont remember link) which if you view cursive font in tablet/mobile it does not show as cursive, but some other generic font, so saying cursive font is supported in all devices is clearing not true! Maybe when devices were limited to desktop and laptop devices since it refers to CSS2.1 it may have been true. So to rely on these other devices supporting a specific type or support cursive font at ALL is impractical, so the best option would be to download the cursive font type, or link to font website files to guarantee the font required shows. Link to comment Share on other sites More sharing options...
Ingolme Posted July 18, 2016 Share Posted July 18, 2016 By that logic, neither are serif, sans-serif or monospace. You can't be sure any two browsers will render the exact same font when using generic types, but as far as supporting it, every browser supports it, they just render it in their own way. On my computer the cursive font is represented with Comic Sans. There's no font called "cursive" as far as I know, that's just a generic name. The same way there are no font files for "sans-serif", they aren't font names, they're just generic font types. Link to comment Share on other sites More sharing options...
dsonesuk Posted July 18, 2016 Share Posted July 18, 2016 It represents a font that resembles joined handwriting 'king basil', 'milk shake', using 'cursive' will just produce crappy 'comic-sans' which is not what i would call 'cursive' see https://theedixieflatline.wordpress.com/2013/02/19/the-problem-of-cursive-fonts/ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now