HTML Special Codes

It appears that HTML special codes work sometimes but not all the time.

Using FireFox, please look at http://tchristy.net/dev/subcategory.php?pr=jse&cat=Hose+%26+Garden+&subcat=Sprayers&expandable=0&subexpandable=2&subsubexpandable=23

Notice the top item in the Sprayers list has the special character 1/2.

Then click Read More on that item. Note that the large text at the top has 3   Actual Gallon Sprayer. Note the special char for 1/2 is missing.

View Source. The code ½ (for 1/2) is there but not displayed.

Why?
Richard KortsAsked:
Who is Participating?
 
Dave BaldwinConnect With a Mentor Fixer of ProblemsCommented:
These four scripts are for the 'Cufon' font substitution.  I believe the 'Cufon_now()' activates the substitutions.
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/helveticatitle_400-helveticatitle_700.font.js"></script>
<script type="text/javascript" src="js/homevetica_italic_900.font.js"></script>
<script type="text/javascript" src="js/custom.js"></script>

Open in new window

The middle two are the font definitions and the bottom one is basically the CSS redefinition for a number of elements.  A simple explanation: http://css-tricks.com/snippets/html/cufon-101/
0
 
Dave BaldwinFixer of ProblemsCommented:
Except that your image on the 'Read more' page does not show up in IE, it all works fine in IE and Firefox here.  You might want to remove the spaces on the left in front of your DOCTYPE and I don't know if IE likes 6 decimal places in the image width.  I've never used anything but integers for image width and height.

Oops, sorry, I missed the one in the header.  Have you checked to see if your font actually has the 1/2 character in it?  It doesn't necessarily have to.
0
 
MichaelBusiness AnalystCommented:
the 1/2 is indeed not showing up in Chrome.
Perhaps the reason is because you're using a cufon font which doesn't have the 1/2 character?
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Dave BaldwinFixer of ProblemsCommented:
Is this line supposed to be 'helvetica' instead of 'homevetica'?

<script type="text/javascript" src="js/homevetica_italic_900.font.js"></script>
0
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
works on chrome
0
 
Dave BaldwinFixer of ProblemsCommented:
No, it doesn't.
3 gallon
0
 
Richard KortsAuthor Commented:
Dave Baldwin,

Where are you seeing "homevetica"? It is not in the source of the product detail page.

Thanks
0
 
Dave BaldwinFixer of ProblemsCommented:
Yes, it is.  Line 12.  Would I lie to you?
0
 
Richard KortsAuthor Commented:
To all,

This is at the bottom of some pages: <script type="text/javascript"> Cufon.now(); </script>

I inherited this design. What is Cufon_now() ?
0
 
Richard KortsAuthor Commented:
Here is a script in the js folder called by that name; it's source is attached.

What a mess, I don;t need all this I'm trying to do something simple.

Does that mean other HTML codes will not work either?
homevetica-italic-900.font.js
0
 
Richard KortsAuthor Commented:
Dave Baldwin:

The non integers on image dimensions are because they are calculated by php (based on the ACTUAL image size). I forgot to use intval(), etc.

Everything else works fine. I should clean that up, but............
0
 
Richard KortsAuthor Commented:
To Dave Baldwin

The lines with those several javascript references are in a file called scripts.php; it's attached.

As an experiment, I just removed all the lines near the top that start: <script type="text/javascript"

That made the 1/2 code to display on the detail page heading, but it screwed up a WHOLE bunch of other things.

My inclination is just to leave 1/2, 1/4, etc as 3 characters of text & forget the special codes; but I am using other special characters like the degree symbol, the R in a circle, etc.

Those are not USUALLY in the title, but I'm not positive they will not be used in other places where this cufon nonsense is in effect.

I'm getting the impression that cufon is only used in some places; but the css makes no references (in the css files).

What a mess!!
scripts.php
0
 
Richard KortsAuthor Commented:
Dave Baldwin,

Do you think that if I removed Cufon_now() from a specific page it would stop activation of the cufon font (& thus NOT override the 1/2, etc., chars). I also thought of making an h1 style that was Arial, 18 pt, Italic so I could change that headline to a readable format.

Thanks
0
 
Dave BaldwinFixer of ProblemsCommented:
I don't know for sure, I don't use Cufon.  Make a backup copy and try it.  That's what I would do.
0
 
Richard KortsAuthor Commented:
Dave Baldwin,

I tried a bunch of things; the cufon seems to override everything. Just to make sure the h1 styling was taking place, I made the font size enormous (32 pt); it does not take. Maybe I got it wrong. Does this look OK to you:

<h1 style="font-size: 32pt; font-family: Arial; font-style:italic;"><strong>content</strong></h1>
0
 
Dave BaldwinFixer of ProblemsCommented:
"js/custom.js" re-styles a lot of things and I believe 'h1' is one of them.  It's probably overwriting what you are putting in there.
0
 
Richard KortsAuthor Commented:
The problem is not solved; thanks for your efforts.

I need to explain to the client that we can't use those fraction codes.
0
 
Richard KortsAuthor Commented:
To Dave Baldwin

Can you look at this?

http://stackoverflow.com/questions/2738303/how-to-disable-cufon-on-certain-elements/2740784#2740784

The item by Michael Collier

I don't understand "Usage: remove_cufon('#name')".

What is #name? Is that the context of <a name="name">...</a> so I have to enclose the element I don;t want "cufonized" in this structure?
0
 
Dave BaldwinFixer of ProblemsCommented:
I don't know.  You'll just have to try some things and see what works.
0
 
Richard KortsAuthor Commented:
Dave Baldwin

I figured it out; you put it in a div & give the div an id='h1ar'. Then in Javascript you put remove_cufon('#h1ar'); as well as those other functions.

It suppresses cufon. Now to find a font that looks ALMOST like that; Arial ain't close.

Thamks
0
 
Dave BaldwinFixer of ProblemsCommented:
And that gets back to the original reason to use Cufon in the first place.  To use a font that Doesn't look like Arial or one of the standard web fonts.  I have this page to show what some of the most common fonts look like: http://www.dibsplace.com/webdev/fontshow.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.