First, make the fruit compôte. Pour 600ml/20fl oz water into a large pan, add the lemon zest and bring to the boil. Add the apricots, cranberries and pineapple, reserving 2 apricots and 5 cranberries for decoration. Bring to the boil, lower the heat and simmer for 40 minutes. Remove from the heat and leave to cool for at least 4 hours, or preferably overnight. Once cool, strain the fruit, reserving the syrup.
For the custard, put the egg yolks, cornflour and sugar into a large bowl and stir together with a whisk. Heat the milk and cream together in a pan until hot but not boiling. Gradually whisk into the yolks, then return the mixture to the pan. Stir over a high heat until the mixture just comes to the boil and the custard thickens. Take off the heat, cover and allow to cool.
For the fillings, split the trifle sponges and spread generously with the apricot jam. Sandwich together and arrange in the base of a 3 litre/5¾ pint trifle dish, close together, cutting to fit if necessary. Crumble the ratafias over the top.
Combine 250ml/9fl oz of the reserved fruit syrup with the sherry and sprinkle over the sponge and crumbled biscuits. Level the surface by pressing down with a spoon.
Scatter the plump fruit over the sponge, then spread the cooled custard over the fruit. Cover and leave until completely cold before transferring to the fridge to chill and set.
To decorate, beat the cream until just stiff enough to hold a soft, floppy shape. Spoon half into a piping bag fitted with a plain nozzle and gently spread the remaining half over the surface of the set custard and scatter with the almonds. Pipe blobs of cream around the edge of the trifle bowl. Halve the reserved apricots, then slice thinly. Cut each cranberry into three small pieces. Put a piece of apricot and a piece of cranberry on each blob of cream to decorate. Cover and chill until ready to serve.