Task #4469 (new)
Opened 13 years ago
Last modified 13 years ago
Model: font attributes — at Version 15
Reported by: | jburel | Owned by: | dzmacdonald |
---|---|---|---|
Priority: | minor | Milestone: | OMERO-Beta4.3 |
Component: | Model | Version: | n.a. |
Keywords: | n.a. | Cc: | wmoore, dzmacdonald, ajpatterson, jamoore |
Resources: | n.a. | Referenced By: | n.a. |
References: | n.a. | Remaining Time: | 0.1d |
Sprint: | 2011-05-05 (11) |
Description (last modified by ajpatterson)
Review the font attributes
We currently have
- !fontStyle describing a mix of font style and font weight.
- fontFamily describing font.
The terms we have in fontFamily are probably wrong, but the miss-use is very common. In general use on the web they can either be a specific font family name (e.g.Times, or Ariel) or a generic family name. Thought in HTML/CSS you can list several in the attribute and they will be used in order if available on the system. This is nice and flexible but leads for complex string you need to parse. From the CSS/HTML spec suitable generic values are:
- serif
- sans-serif
- cursive
- fantasy
- monospace
After compiling the font mapping file I recommend we need to have an enum of:
- serif
- sans-serif
- cursive
- fantasy
- monospace
The value we have for fontStyle is not correct either. We are using it as a combination for style and weight.
From the CSS/HTML spec suitable values for style are:
- normal
- italic
- oblique
I had to check what the difference between italic and oblique was. Oblique is the normal letter shapes but slanted forward. Italic is also slanted forward but has different (normally more curved/flowing) letter shapes.
From the CSS/HTML spec suitable values for weight are:
- normal
- bold
- bolder
- lighter
- or a numeric value from (100,200,300,400,500,600,700,800,900)
I recommend we just need to have an attribute called perhaps fontStyleAndWeight using an enum of:
- normal
- italic
- bold
- bolditalic
Decision
- Merge fontStyle and fontWeight. Keep fontStyle. Update clients (#4836), schema and DB (see #4398)
- Model: fontFamily will use enumeration cf. values above. Define enumeration in model
- For upgrade: Provide mapping for fontFamily (andrew)
A mapping has been generated - see attachment.
This covers all the common fonts (web, windows standard, mac standard, and open source used by linux variants & open office)
All the mapping are simple except for "Modern" which can be 3 different things.
- Windows API Modern = monospace
- General Modern = serif
- Mac Modern = sans-serif
Change History (16)
comment:1 Changed 13 years ago by jburel
- Remaining Time set to 0.5
comment:2 Changed 13 years ago by ajpatterson
- Status changed from new to accepted
comment:3 Changed 13 years ago by ajpatterson
- Cc wmoore added
- Description modified (diff)
- Remaining Time changed from 0.5 to 0.1
comment:4 Changed 13 years ago by ajpatterson
- Owner ajpatterson deleted
- Status changed from accepted to new
comment:5 Changed 13 years ago by ajpatterson
- Owner set to dzmacdonald
comment:6 Changed 13 years ago by ajpatterson
- Cc dzmacdonald ajpatterson added
comment:7 Changed 13 years ago by jburel
- Sprint changed from 2011-03-10 (7) to 2011-03-24 (8)
comment:8 Changed 13 years ago by jburel
- Sprint changed from 2011-03-24 (8) to 2011-04-07 (9)
Moved from sprint 2011-03-24 (8)
comment:9 Changed 13 years ago by jburel
- Cc jmoore added
- Description modified (diff)
comment:10 Changed 13 years ago by jburel
- Description modified (diff)
comment:11 Changed 13 years ago by jburel
- Description modified (diff)
comment:12 Changed 13 years ago by jburel
- Description modified (diff)
comment:13 Changed 13 years ago by dzmacdonald
- Sprint changed from 2011-04-07 (9) to 2011-05-05 (11)
comment:14 Changed 13 years ago by ajpatterson
- Description modified (diff)
Changed 13 years ago by ajpatterson
comment:15 Changed 13 years ago by ajpatterson
- Description modified (diff)
Moved from sprint 2011-03-10 (7)