Bug 4587 - StyledText - support italic fonts and italic font style (1G60C4X)
Summary: StyledText - support italic fonts and italic font style (1G60C4X)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P1 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 4603 10148 30381 38634 38636 51459 (view as bug list)
Depends on:
Blocks: 31827
  Show dependency tree
 
Reported: 2001-10-11 14:19 EDT by Lynne Kues CLA
Modified: 2004-05-03 18:24 EDT (History)
6 users (show)

See Also:


Attachments
example display of italic (166.69 KB, image/bmp)
2001-12-20 14:39 EST, Lynne Kues CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lynne Kues CLA 2001-10-11 14:19:26 EDT
Until PR 1G2QFBA: SWT:WINNT - Font metrics wrong for some italics fonts
is fixed, we can't support italics properly.

NOTES:

LK (1/18/01 3:30:40 PM)
	Low priority until someone asks for this.

LK (1/30/01 11:58:30 AM)
	Supporting this is now further complicated by the fact that we are using bit bltting when typing.
	Italic fonts won't hold up to the bltting.	We did this to improve performance on Linux.

LK (2/7/01 12:04:18 PM)
	Opened 1G8SBZX: SWT:WIN - StyledText - Italic fonts and bltting overhangs on our end.
	This will deal with the bltting problem when the font for the entire widget is italic.  Still not going
	to do individual italic styles until someone asks.

LK (2/7/01 12:11:18 PM)
	We don't support italic fonts for the entire widget.  Cheese will occur during text changes (due to our
	bltting) and when changing from italic bold to italic regular (and vice versa).  In these instances,
	more of the changed text area has to be drawn in order to deal with overhangs.  See PR
	1G8SBZX: SWT:WIN - StyledText - Italic fonts and bltting overhangs.  Moving to Inactive.
	
LK (2/8/01 12:06:13 PM)
	Also see PR 1G8SBXB: SWT:WIN - StyledText - Italic font and bold styles not working together.
	Mentions that for a lot of italic fonts the baseline seems to different from the bold version.
Comment 1 DJ Houghton CLA 2001-10-29 16:23:42 EST
PRODUCT VERSION:
0.056

Comment 2 Lynne Kues CLA 2001-12-20 14:39:04 EST
Created attachment 204 [details]
example display of italic
Comment 3 Lynne Kues CLA 2001-12-20 14:42:24 EST
If italic character measurements from the platform were correct, we could handle 
this with minimal code changes.  However, because the mesaurements from the 
platform are off, there will be instances when italic letters are "chopped off".  
See the attachment.  This behavior will occur when background colors are used or 
when selection occurs.

Part of the cheesey selection behavior can be rectified by drawing the entire 
line when a selection occurs (i.e., since we are using double buffering already 
this shouldn't be too bad).

Deciding against doing this.  Thought that if Linux supported the italics fine 
it might be worth doing it, but I can't verify that now since there appears to 
be a bug with the FontDialog on Linux.
Comment 4 Lynne Kues CLA 2001-12-20 14:59:03 EST
Notes on changes to support italics:

- add var for italic font, modify getFontStyleRanges to account for italic type, 
change StyledTextBidi constructor to take italic font as a parameter, change 
handleDispose to dispose of italic font, change setFont to dispose of/reset 
italic font, change initializeFonts to set italic font, change setLineFont 
method to check for italic font

- change rendering during selection to draw entire line
Comment 5 Lynne Kues CLA 2002-07-08 10:33:33 EDT
Consider later.
Comment 6 Veronika Irvine CLA 2002-09-10 10:20:26 EDT
Post 2.0. Re-opening bug reports for review.
Comment 7 Lynne Kues CLA 2002-09-10 12:49:35 EDT
*** Bug 10148 has been marked as a duplicate of this bug. ***
Comment 8 Lynne Kues CLA 2002-09-10 12:52:18 EDT
*** Bug 4603 has been marked as a duplicate of this bug. ***
Comment 9 Lynne Kues CLA 2003-02-10 15:11:25 EST
*** Bug 30381 has been marked as a duplicate of this bug. ***
Comment 10 Sebastian Davids CLA 2003-06-08 12:59:35 EDT
*** Bug 38636 has been marked as a duplicate of this bug. ***
Comment 11 Sebastian Davids CLA 2003-06-09 06:34:20 EDT
*** Bug 38634 has been marked as a duplicate of this bug. ***
Comment 12 Lynne Kues CLA 2003-09-04 13:11:41 EDT
Reassigning to SWT Inbox since OTT taking over StyledText.
Comment 13 Grant Gayed CLA 2004-02-11 09:57:03 EST
*** Bug 51459 has been marked as a duplicate of this bug. ***
Comment 14 Steve Northover CLA 2004-03-24 09:18:08 EST
I am upping this to P1.  Eclipse would like to use italic fonts.  With the new 
TextLayout class, the cheese problems *should* be gone.  FH to investigate 
AFTER M8.
Comment 15 Felipe Heidrich CLA 2004-04-26 11:25:37 EDT
You guys also expect to have angled caret implemented by Eclipse 3.0 ?
angled caret == place the caret over italic text in MS Write or MS Word.

As far as Java editor goes I don't think it would use angled caret.
Comment 16 Erich Gamma CLA 2004-05-03 05:34:15 EDT
There is no expectation to get an angled bracket. 
Comment 17 Erich Gamma CLA 2004-05-03 05:36:02 EDT
oops, I meant angled _caret_
Comment 18 Felipe Heidrich CLA 2004-05-03 18:24:47 EDT
Fixed > 20040503 in HEAD.
StyleRange can be created with fontStyle == SWT.ITALIC