Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #4469 (closed)

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

Model: font attributes

Reported by: jburel Owned by: jburel
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.0d
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)

The decision to keep fontStyle means that the minimum change will be made to it to keep it in line with the above recommendation. This means it will retain it current capitalisation and have 'Regular' replace by 'Normal'. The resultant enum will contain:

  • Normal
  • Italic
  • Bold
  • BoldItalic
  • 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

Attachments (1)

font-mapping.txt (2.5 KB) - added by ajpatterson 13 years ago.

Download all attachments as: .zip

Change History (35)

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)

Moved from sprint 2011-03-10 (7)

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)

comment:16 Changed 13 years ago by Andrew J Patterson <ajpatterson@…>

(In [b1f9d1fecc8b8580cea4ea0fb71a220826a956b2/ome.git] on branch develop) Update FontFamily? and FontStyle? (see #4469)

Changed so FontFamily? mirrors HTML/CSS use.
Changed FontStyle? to be simplified version of HTML/CSS font-style AND font-weight.

comment:17 Changed 13 years ago by jburel

  • Owner changed from dzmacdonald to jburel
  • Status changed from new to accepted

comment:18 Changed 13 years ago by jburel

  • Owner jburel deleted
  • Status changed from accepted to new

comment:19 Changed 13 years ago by jburel

  • Owner set to jburel

comment:20 Changed 13 years ago by jburel

  • Remaining Time changed from 0.1 to 0.25

TODO:

  • map values
  • convert the existing values when saving them back. (lassy update)
  • saving using the new values.

comment:21 Changed 13 years ago by jburel

  • Status changed from new to accepted

comment:22 Changed 13 years ago by jburel

  • Owner jburel deleted
  • Status changed from accepted to new

comment:23 Changed 13 years ago by jburel

  • Remaining Time changed from 0.25 to 0
  • Resolution set to fixed
  • Status changed from new to closed

comment:24 Changed 13 years ago by jburel

  • Remaining Time changed from 0 to 0.2
  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:25 Changed 13 years ago by jburel

  • Owner set to jburel
  • Status changed from reopened to accepted

comment:26 Changed 13 years ago by jburel <j.burel@…>

(In [88313bc25a7e15f9e5527441ff5cc82a53c09379/ome.git] on branch develop) Update jar to fix font family, style and weight. (see #4469)

comment:27 Changed 13 years ago by jburel <j.burel@…>

  • Remaining Time changed from 0.2 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

(In [b7df857dee455bda5c6eeceef4d27bc8ed20d62c/ome.git] on branch develop) Convert existing font into the new family.
Lazy update of DB for font weight, style and family (close #4469).

comment:28 Changed 13 years ago by wmoore

Should Insight be writing 'Normal' or 'normal' for fontstyle?

omero=# select fontfamily, fontsize, fontstyle from shape where roi=1;
 fontfamily | fontsize | fontstyle 
------------+----------+-----------
 sans-serif |       12 | Normal
(1 row)

comment:29 Changed 13 years ago by jburel

Normal, Bold are the values in the model.

comment:30 Changed 13 years ago by wmoore

In the ticket above it says...

I recommend we just need to have an attribute called perhaps fontStyleAndWeight using an enum of:

  • normal
  • italic
  • bold
  • bolditalic

You want me to edit this?

comment:31 Changed 13 years ago by wmoore

  • Description modified (diff)

comment:32 Changed 13 years ago by ajpatterson

  • Description modified (diff)

comment:33 Changed 13 years ago by ajpatterson

Edited to clarify the decision.

comment:34 Changed 13 years ago by Will Moore <will@…>

(In [f0a89ec2f536c5a9ab94d0f87f37cba5863f8ee3/ome.git] on branch develop) Updating web ROI to handle fontStyles of 'Bold' etc instead of 'bold'. See #4469, #5072

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.76537 sec.)

We're Hiring!