Font and CSS in HTMLDocument
I try to read an HTMLEditorKit. But when there is a font tag in my HTML I have an exception :
Exception in thread "main" java.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at java.awt.Toolkit$2.run(Toolkit.java:500)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:491)
at javax.swing.text.html.CSS.getValidFontNameMapping(CSS.java:932)
at javax.swing.text.html.CSS$FontFamily.parseCssValue(CSS.java:1789)
at javax.swing.text.html.CSS.getInternalCSSValue(CSS.java:531)
at javax.swing.text.html.CSS.addInternalCSSValue(CSS.java:516)
at javax.swing.text.html.StyleSheet.addCSSAttribute(StyleSheet.java:436)
at javax.swing.text.html.HTMLDocument$HTMLReader$ConvertAction.start(HTMLDocument.java:2536)
at javax.swing.text.html.HTMLDocument$HTMLReader.handleStartTag(HTMLDocument.java:1992)
at javax.swing.text.html.parser.DocumentParser.handleStartTag(DocumentParser.java:145)
at javax.swing.text.html.parser.Parser.startTag(Parser.java:333)
at javax.swing.text.html.parser.Parser.parseTag(Parser.java:1786)
at javax.swing.text.html.parser.Parser.parseContent(Parser.java:1821)
at javax.swing.text.html.parser.Parser.parse(Parser.java:1980)
at javax.swing.text.html.parser.DocumentParser.parse(DocumentParser.java:109)
at javax.swing.text.html.parser.ParserDelegator.parse(ParserDelegator.java:74)
at javax.swing.text.html.HTMLEditorKit.read(HTMLEditorKit.java:242)
at HtmlMail.main(HtmlMail.java:35)
Do you know the way to avoid this error ?
I have this problem with Solaris and not with windows
Similar Messages
-
I know a font that it is not installed in the system can be used the following way
BufferedInputStream bis = null;
try {
bis = new java.io.BufferedInputStream(new java.io.FileInputStream("C:\\ProggyTiny.ttf"));
final Font font = Font.createFont(Font.TRUETYPE_FONT, bis);
font.deriveFont(Font.PLAIN, 12);
// Now you can do jLabel.setFont(font); or something like this
} catch (Exception e) {
e.printStackTrace();
} finally {
try {if (bis!=null) bis.close(); } catch (Exception e) {}
}But I'm using a JTextPane in order to show some HTML content. The html code is styled using CSS. How can I use a current font in a CSS rule?OK,
I have given up messing with stylesheets, trying display:
block, inline, different ways of formatting the XML, messing with
XML.ignoreWhiteSpace, and XML.prettyPrinting etc.
I went down the route of encodeURI, using a RegExp to strip
out all tabs, linefeeds and carriage returns. This now gives
consistent results for all situations, even embedded and none
embedded fonts.
e.g.
_text:String = TEXT FROM XML, HTML TEXT etc
var st:String = encodeURI(_text);
var pattern:RegExp = /(%09)+|(%0A)+|(%0D)+/g;
st = st.replace(pattern, "");
st = decodeURI(st);
YOUTEXTFIELD.htmlText = st;
The <p> tags still behave as a <br/> tag, but you
can add an extra <br/> to simulate a paragraph.
Here is the example again with the updates,
Hope this helps someone -
I just updated my Firefox browser to Firefox 8. I am a college student and practice with HTML and CSS for class assignments. The fonts in all my html documents are being overwritten online by your script typeface. I did not have this issue in the older version. I use an iMAC running OS10.6.8. How do I resolve this issue?
Starting with this, you have errors in your CSS code.
body {
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
margin-left: 0px;
color: 151515;
font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
background-color: EFF5F8;
body {
margin:0;
color: #151515;
font-family: "Gill Sans", "Gill Sans MT", "Myriad Pro", "DejaVu Sans Condensed", Helvetica, Arial, sans-serif;
background-color: #EFF5F8;
font-size: 100%;
Related links:
Windows Chrome, why do my fonts look so bad? - Lee Green
css3 - Bad font rendering Chrome - Stack Overflow
Nancy O. -
I have created a page with my resumé, using Dreamweaver CS4 on my iMac (running OS X 10.6.6). You can see the page here: http://www.peterforkes.com/Resume.html
It looks great when it is on the screen, but when I print it I would like the links to not be underlined and also to be displayed in the same font (and color) of the text surrounding it (a link is largely useless on a piece of paper, if it it not showing the URL).
So, I created a stylesheet called "print.css" and have this in it:
a:link {
text-decoration: none;
In my html document (Resume.html) I have this code, at the top:
<link href="_css/Resume.css" rel="stylesheet" type="text/css" media="screen" />
<link href="_css/Print.css" rel="stylesheet" type="text/css" media="print" />
Now, things such as the graphics in my document do not print out (this is how I want it) but links seesm to be doing unexpected things for me. As I mentioned, when I print the page I would like them to:
a) not print with an underline (which I would expect the code snippet shown above to do).
b) I would like the link color to be the same as the surrounding text (I have links in several places, such as in <h2>, <h3> and <p>).
c) I would like the link to have the same font and text size as the surrounding text.
Any help is always appreciated.
Peter A. ForkesYou've solved it for a:link but you may print the page with the <a> tag in link or visited state so you need to cover both.
In http://www.peterforkes.com/_css/Print.css
change
a:link {
text-decoration: none;
to
a:link, a:visited {
color: #333;
text-decoration: none; -
Is it possible to get the style, font and related info of a paragraph text of a in design file and write all the stuff on the same in design file on the left side with small fonts
as
Lets this is a text in in design file :
style : abc we are going to check the condition Agence Wallonne pour la Promotion d'une Agricultur we are going to check the condition Agence Wallonne pour la font 12 d'une Agricultu we are going to check the condition Agence Wallonne pour la Promotion d'une Agricultu
style : xyz we are going to check the condition Agence Wallonne pour la Promotion d'une Agricultur we are going to check the condition Agence Wallonne pour la font 10 d'une Agricultu we are going to check the condition Agence Wallonne pour la Promotion d'une AgricultuHi Poojith
Not sure if this would solve your requirment but just in case might be helpful:
1. We can mix up the HTML and HTMLB components in the JSP Page. However, can access only the HTMLB components in the controller. The following link refers to what customizations are offered by the HTMLB framework:
[http://www.sapdesignguild.org/resources/htmlb_guidance/]
2. Another option would be to use AbstractPortalComponents or a simple web app if that's feasible. (where custom UI themes, css and layout are more in control of the developers.)
Thanks
Deepak -
Custom html and css broken in BC
I have created some content in iWeb. A photo gallery that doesn't work when uploaded to BC.
It works fine when I upload to a different Host.
http://isodisc.businesscatalyst.com/usbcat/ISODISC_Full_USB_Flash_Catalog.htmlI'm building my website in Muse, using a few Adobe typeKit fonts - Open Sans and Bebas Neue. There's plenty of code and css developed when I export the muse file QUESTION: Will Contribute maintain my font choice integrity? Or do I play it safe with standard web-safe choices?
-
Text in layout and preview screens are different and CSS changes are not registering
I am new to designing web sites and I am using GoLive CS. Things have been going pretty smoothly, but now I have noticed a problem. When laying out my site pages, I am having problems with the text. I have inserted a layout text box and created a general CSS for my main content.
I have selected 11 px for my font size and 14 px for my line height. But when I make any changes to these values, the chages appear in my layout view, but when I preview the spacing is off (the line height is extremely tight). Why is this and how can I fix it? Also no matter what text I type, the layout view and the preview view are always off, is there any way to fix this?Hi Kim - layout view is there just to give you an approximation of where things are in your layout, not a reliable representation of how it will be rendered in the browser. Actually, same goes for Preview. In your layout/design, you have to allow for some variance in font size and presentation since the site will be viewed on multiple platforms, browsers, environments, etc. You can get close by specifying font and line height in pixels, as you have, but it's still just "close".
If your layout relies heavily on absolutely positioned elements (Layers, Grids, etc.) then this can become a problem... one of the big reasons to avoid both. -
Changing fonts and layout of Interactive Report
Can we change the layout and fonts and colors in an INteractive report?
Can we apply a report template to an interactive report?
Edited by: SaintMahatma on Feb 23, 2009 1:48 PMI did it like this and it worked.
<html lang="&BROWSER_LANGUAGE." xmlns:htmldb="http://htmldb.oracle.com">
<head>
<title>#TITLE#</title>
<link rel="stylesheet" href="#IMAGE_PREFIX#themes/theme_3/theme_3_1.css" type="text/css" />
#HEAD#
<STYLE type="text/css">
.apexir_WORKSHEET_DATA td *{
background:#ffffff;
border-top:1px #fff solid;
border-bottom:1px #ccc solid;
font-size:11pt;
padding:3px 9px;
empty-cells:show!important;
</STYLE>
</head>
<body #ONLOAD#>#FORM_OPEN#
It's a hard to read the apex_3_1.css because it's all written in one line. So it's a good way to copy the file into an Editor and add additional breaks after each ";" -
About HTML and CSS styles in the Contribute Style menu
This question was posted in response to the following article: http://help.adobe.com/en_US/contribute/using/WS5b3ccc516d4fbf351e63e3d1180fba3730-7e6cCS5. html
I'm building my website in Muse, using a few Adobe typeKit fonts - Open Sans and Bebas Neue. There's plenty of code and css developed when I export the muse file QUESTION: Will Contribute maintain my font choice integrity? Or do I play it safe with standard web-safe choices?
-
How to change the font and font size of content shown in facet "infoUser" ?
Hi,
How can I change the font and font size of content shown in facet "infoUser" using style class?
I tried placing my class in my css but no success.
Any of your help would be highly appreciated.Hi,
are you using an af:outputFormatted component inside the infoUser facet?
Brenden -
FF4 fonts and photos look funny
OK, so I installed FF4 in w7, std installation-- the fonts in my usual sites all look funny and disconcerting (I just accepted font defaults, no tweaking). Pictures in my messages on a social site had a white border at top and bottom. Switched back to v 3.6, and everything is normal. I did look and notice that the photos still had a top and bottom border, but it was much less noticeable, so much so that I would not have seen it unless I had been looking for it.
So my conclusion is that FF4 does not have the graphics stuff down yet. Too bad.Don't hijack someone else's thread please.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Kogut" <[email protected]> wrote in message
news:ej57fh$os2$[email protected]..
> Hi,
> I was wondering if someone may give me an advice.
> I m trying to install a pop up menu in Dreamweaver 8
using Fireworks 8
> with a
> combination of Japanese and English text.
>
> Everything seems to work fine in Dreamweaver but when I
want to edit the
> menu
> back in Fireworks it looses the Japanese fonts and in
reverse I get
> something
> like (??;???xk25%;;).
>
> I am using XHTML with charset=shift_jis and CSS.
>
> Thank you very much for your time.
>
> Marcin
>
> -
Documentation for FXML and CSS
Where can I find documentation that lists all the different things you can do using FXML and CSS for JavaFX?
For example, how am I supposed to know that I can do "-fx-font-size: 12px" for font size in CSS or "Font name='System' size='12.0' />" for FXML?CSS Styling
Here is the css reference guide, which is an excellent start.
Complement it by thoroughly studying caspian.css (the JavaFX 2.2. stylesheet) and modena.css (the JavaFX 8 stylesheet).
There is also css styling info scattered throughout the Oracle JavaFX tutorials.
Try using the material from the css reference guide to style some of the simple default controls, like buttons etc.
Once you have the hang of that, move on to more complex things like graphs and tables.
Don't forget tricks like overriding some of the default paint constants as it makes styling much easier if all you need is a color change, for example try the following stylesheet:
.root { -fx-base: antiquewhite; }
FXML Reference
There is (and never will be) any such thing (as least not a complete one).
FXML works by reflecting on classes.
As you can add more classes to your classpath or modify existing classes, you can add more elements and attributes to fxml.
Best current documentation of fxml is the Introduction to FXML as well as the FXML tutorials from Oracle.
In terms of learning some of the more common elements and attributes for FXML for standard JavaFX controls, try loading up SceneBuilder and examining the FXML it generates.
Also, as FXML is a reflection of the JavaFX Java API, you can get to know what attributes and elements it can use by looking at the standard JavaFX javadoc.
All that said, I think the FXML documentation could be improved, so if, after you go through in detail studying the available information I provided in this post, you have concrete ideas for improvement of the documentation, feel free to file specific detailed requests in the JavaFX issue tracker, or send feedback to the JavaFX documentation team's email address: [email protected] -
DW Beginner - Tables, Div Tags and CSS Confusion
Hi,
I am a beginner to DW. The layout I am designing is as follows:
First I have an overall "container" on the outside of my layout which I called "wrapper" and I made it using a div tag.
Next I made a table within or right after this "wrapper" div tag, which I called my "navbar".
After this table I made another table named left and right column (r:1 cz:2).
And lastly, another table, called "footer".
Now, I made a CSS for the div tag, no problem. But, when I go to make CSS for the tables, that's where it gets confusing.
For example, I went into my "navbar" table, selected on the "trail" <td>, and then tried to create a CSS for this particular table.
Problem: Why when setting my font or background or any other setting, are the other 2 tables changing also if I only assigned this specific area for the CSS navbar table? Am I selecting the wrong "trail" or is it because it is still entrapped somehow in the "wrapper" div tag, so it won't allow my new CSS settings? I would appreciate any help. This can really get confusing fast, especially for us beginners trying to learn.
Thanks,
SSince you're new to DW, I'm assuming you're new to HTML and CSS, too. So start by learning code basics first and you'll have a much easier time understanding DW.
Begin here:
HTML & CSS Tutorials - http://w3schools.com/
CSS layouts are much more flexible than tables. Below are some example of CSS layouts (no tables needed)
http://alt-web.com/TEMPLATES/I-page-with-floats.html
http://alt-web.com/TEMPLATES/2-col-fixed-layout.shtml
http://www.tjkdesign.com/articles/one_html_markup_many_css_layouts.asp
From Tables to CSS Web Design Part 1 -
http://www.adobe.com/devnet/dreamweaver/articles/table_to_css_pt1.html
From Tables to CSS Web Design Part 2 -
http://www.adobe.com/devnet/dreamweaver/articles/table_to_css_pt2.html
Good luck,
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com
How To get Help Quickly in DW Forums
http://forums.adobe.com/thread/470404 -
Font and size changes in design view don't appear
I am using the trial version of Dreamweaver CS3 on my G5 Mac
(Leopard), and whenever I make changes to the font and font size,
it does not appear in the design- although the code is there (in
both the css that I create or specific to the paragraph) and then
it shows up when I save and go to browser. Is there some secret to
making the changes viewable as they are being made rather than
having to go to the browser every time before one can see them? It
doesn't seem very practical to only be able to view them in a
browser and not while you are making changes so you know if it is
what you want... can someone please help me with this? I'd like to
buy CS3, and use Dreamweaver, but it won't save me any time if I
have to keep going back to the browser before I can see the changes
I've made.On Sat, 29 Dec 2007 01:44:29 +0000 (UTC), "Norma Jean
Almodovar"
<[email protected]> wrote:
>I am using the trial version of Dreamweaver CS3 on my G5
Mac (Leopard), and
>whenever I make changes to the font and font size, it
does not appear in the
>design- although the code is there (in both the css that
I create or specific
How are you making the changes - using the properties box in
CSS mode
- or in an external style sheet.
~Malcolm N....
~ -
Font and Font size in my YUI calendar overriding main text styles?
I downloaded the YUI calendar but the default font settings are overriding my main text styles...??
I know I'm bad for asking w/out it being online. It's not quite ready, hopefully it will be online early next week.
I can tell you that when I added the calendar to my site there were 2 seperate CSS style sheets that came with it. One called fonts-min.css and the main calendar one is the calendar.css file. The css font styles that govern the calendar seem to be in the fonts-min.css and look like:
body{
*font-size:small;*font:x-small;
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
line-height: 1.231;
}select,input,button,textarea{font:99% arial,helvetica,clean,sans-serif;}table{font-size:inherit;font:100%;}pre,code,kbd,samp,tt {font-family:monospace;*font-size:108%;line-height:100%;}
I have the fonts and sizes I would like in my main body tag and also I tried again by styling a <p> tag; which I know is redundant...
** my css styles are in an external style sheet; fyi
I like the way the default calendar is styled but when it overrides my main text it makes the main text way too small....
Maybe you are looking for
-
When I clicked "download" to install Photoshop CC, the download manager crashed. Just trying to get info to find out how to install Photoshop CC. Thanks, Patti
-
Does not support french character in UTF-8
I am using adobe flash 3 and all coding pattern in action script 2. I have french language's xml file which I have to show content in flash player. I have used UTF-8 for encoding. But my french encoding character is not working.How to show french l
-
What are the chances my trade-in phone was stolen by USPS?
I successfully traded-in one iPhone 5s using the pre-paid USPS envelope from VZW, and got my electronic rebate card. The second trade-in of an iPhone 5s was put in the mail (using another pre-paid envelope from VZW) 2 days later and is no-where to be
-
Can we acess the inbox using native code
I just wanted to acess the SMS inbox using j2me code, but came to know that we cannot acess the inbox using j2me code so i just had a query that cant we find the underlying os name and version using System.getProperty() and then depending on the os h
-
how can i put videos on my ipod, i try, tells me iPod cannot play it...how can i fix this problem, another forum said try MP4, doesnt work, wat to do now? 1 MP4 video worked, but another one failed to go on the iPod, wat is going on here ! one thing