Press the water out of the tofu by placing it between two plates and putting some weight on the top.
Drain the canned pineapple - keep the juice - then slice the rings into small, approx 2 cm pieces.
Wipe the tofu with paper kitchen towel, then cut it into 2-3 cm cubes. Put these into a bowl and pour over 3 Tbsp of pineapple juice. Marinate for 30 minutes.
Slice the peppers into 1 cm wide strips. Peel the garlic and ginger then finely chop them - or grate coarsely.
Mix the vinegar, sugar, ketchup, soy sauce and sugar. Add 50 ml of the pineapple juice. Add the cornstarch and mix until you get a smooth paste.
Heat 1 Tbsp oil in a wok. Put in the tofu cubes and, over a medium heat, cook until golden brown on all sides, this should take 8-10 minutes. Transfer them to a bowl lined with kitchen paper.
Wipe out the wok, then add the remaining oil. When hot, add the garlic & ginger and stir-fry for 30 seconds. Add the pepper strips and stir-fry for 2-3 minutes while stirring constantly.
When the peppers are tender and slightly brown, pour in the sauce and let it bubble until you get a thick, glossy sauce. Then add the tofu pieces and the pineapple chunks.
Warm through for 2 minutes and serve.